관리-도구
편집 파일: test_twisted.cpython-311.pyc
� �܋f( � � � d dl mZmZ d dlmZ d dlmZ d dlmZm Z m ZmZ d dl mZmZ e� � Z G d� de� � ZdS ) � )�Logger�formatEvent)�Failure)�TestCase)�compare�ShouldRaise�StringComparison�ShouldAssert)� LogCapture�INFOc �V � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd � Zd� Z d� Zd S )�TestLogCapturec � � t j | � � }t � dd�� � |� t df� � d S )N�er, {greeting}�hi��greeting�er, hi)r �make�log�info�checkr ��self�captures �p/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/testfixtures/tests/test_twisted.py�test_simplezTestLogCapture.test_simple sE � ��/�$�'�'�����!�D��1�1�1�� � �t�X�&�'�'�'�'�'� c �� � t j | � � }t � dd�� � t |j � � dk sJ �t |j d d d�� � d S ) Nr r r � r � log_namespaceztestfixtures.tests.test_twisted��expected)r r r r �len�eventsr r s r � test_capturedzTestLogCapture.test_captured si � ��/�$�'�'�����!�D��1�1�1��7�>�"�"�a�'�'�'�'����q�!�/�2�=^�_�_�_�_�_�_r c �� � t j | d�� � }t � ddd�� � t � ddd�� � |� ddgddg� � d S )N)�a�b��fieldsz{a}, {b}r � � � )r r r r r r s r �test_fieldszTestLogCapture.test_fields st � ��/�$�z�:�:�:������q�A��&�&�&�����q�A��&�&�&�� � � ��F� ��F� � � � � r c � � t j | t f�� � }t � dd�� � |� d� � d S )Nr* r r r r )r r r r r r r s r � test_fieldzTestLogCapture.test_field! sG � ��/�$��~�>�>�>�����!�D��1�1�1�� � �h�����r c �� � t j | � � } t d� � �# t � d� � Y nxY w|� d� � | � � � d S )N�all gone wrong�oh dear)r r � Exceptionr �failure�check_failure_text�flushLoggedErrorsr s r �test_check_failure_test_minimalz.TestLogCapture.test_check_failure_test_minimal&