File: //opt/cloudlinux/venv/lib64/python3.11/site-packages/guppy/gsl/__pycache__/Tester.cpython-311.pyc
�
    � h�_  �                   �   �  G d � d�  �        Z  G d� d�  �        Z G d� d�  �        Z G d� de �  �        Z G d� d	�  �        Zd
S )c                   ��   � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z	d� Z
d	� Zd
� Zd� Z
d� Zd
� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z!d � Z"d!� Z#d"� Z$d#S )$�
Doc2Testerc                 ��   � || _         || _        || _        g | _        | �                    g �  �         i | _        i | _        i | _        g | _        d | _	        d | _
        i | _        d| _        d S )N�   )
�mod�doc�node�exdefs�set_out�
test_names�condition_exprs�condition_methods�document_metas�
document_lang�document_title�
example_exprs�ex_id)�selfr   r   r   s       �E/opt/cloudlinux/venv/lib/python3.11/site-packages/guppy/gsl/Tester.py�__init__zDoc2Tester.__init__   sr   � ���������	�������R�������!���!#��� ���!���"��������
�
�
�    c                 �t   � | j         j        }|j        D ]#}	 |�                    | �  �         �# |$ r Y � w xY wd S �N)r   �
ReportedError�children�accept)r   r   �E�chs       r   �_visit_childrenzDoc2Tester._visit_children   s]   � ��H�"���-� 	� 	�B�
��	�	�$������� 
� 
� 
���
����	� 	s   �-�5�5c                 �0   � | �                     |�  �         d S r   )�extend)r   �argss     r   �apz
Doc2Tester.ap   s   � ����D�����r   c                 �F   � d|z   } | j         j        j        |g|�R i |�� d S )NzDoc2Tester: )r   �env�error)r   �msgr!   �kwdss       r   r%   zDoc2Tester.error   s9   � ��s�"�������3�.��.�.�.��.�.�.�.�.r   c                 �  � |�                     �   �         }| j        �                    |�  �        }|���dt          | j        �  �        z  }|| j        |<