Your IP : 3.138.120.112


Current Path : /opt/alt/python311/lib64/python3.11/unittest/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/unittest/__pycache__/runner.cpython-311.opt-2.pyc

�

c��f�$���	ddlZddlZddlZddlmZddlmZddlmZdZ	Gd�de
��ZGd	�d
ej��Z
Gd�de
��ZdS)
�N�)�result)�_SubTest)�registerResultTc�$�eZdZ	d�Zd�Zdd�ZdS)�_WritelnDecoratorc��||_dS�N)�stream)�selfrs  �6/opt/alt/python311/lib64/python3.11/unittest/runner.py�__init__z_WritelnDecorator.__init__s
�������c�R�|dvrt|���t|j|��S)N)r�__getstate__)�AttributeError�getattrr)r�attrs  r
�__getattr__z_WritelnDecorator.__getattr__s.���-�-�-� ��&�&�&��t�{�4�(�(�(rNc�^�|r|�|��|�d��dS�N�
)�write)r�args  r
�writelnz_WritelnDecorator.writelns1���	��J�J�s�O�O�O��
�
�4�����rr
)�__name__�
__module__�__qualname__rrr�rr
rrsI������J����)�)�)�
�����rrc���eZdZ	dZdZ�fd�Zd�Z�fd�Zd�Z�fd�Z	�fd�Z
�fd	�Z�fd
�Z�fd�Z
�fd�Z�fd
�Zd�Zd�Z�xZS)�TextTestResultzF======================================================================zF----------------------------------------------------------------------c���tt|���|||��||_|dk|_|dk|_||_d|_dS)NrT)�superr!rr�showAll�dots�descriptions�_newline)rrr&�	verbosity�	__class__s    �r
rzTextTestResult.__init__&sU���
�n�d�#�#�,�,�V�\�9�M�M�M���� �1�}�����N��	�(�����
�
�
rc��|���}|jr&|r$d�t|��|f��St|��Sr)�shortDescriptionr&�join�str)r�test�doc_first_lines   r
�getDescriptionzTextTestResult.getDescription.sN���.�.�0�0����	��	��9�9�c�$�i�i��8�9�9�9��t�9�9�rc�8��tt|���|��|jri|j�|�|����|j�d��|j���d|_dSdS)N� ... F)	r#r!�	startTestr$rrr0�flushr'�rr.r)s  �r
r3zTextTestResult.startTest5s����
�n�d�#�#�-�-�d�3�3�3��<�	"��K���d�1�1�$�7�7�8�8�8��K���g�&�&�&��K������!�D�M�M�M�		"�	"rc��t|t��}|s|jr�|js|j���|r|j�d��|j�|�|����|j�d��|j�|��|j���d|_dS)Nz  r2T)�
isinstancerr'rrrr0r4)rr.�status�
is_subtests    r
�
_write_statuszTextTestResult._write_status=s�����h�/�/�
��	'���	'��=�
&���#�#�%�%�%��
(���!�!�$�'�'�'��K���d�1�1�$�7�7�8�8�8��K���g�&�&�&�����F�#�#�#����������
�
�
rc����|��|jrIt|d|j��r|�|d��n�|�|d��np|jrit|d|j��r|j�d��n|j�d��|j���tt|���
|||��dS)Nr�FAIL�ERROR�F�E)r$�
issubclass�failureExceptionr:r%rrr4r#r!�
addSubTest)rr.�subtest�errr)s    �r
rBzTextTestResult.addSubTestJs�����?��|�

$��c�!�f�g�&>�?�?�9��&�&�w��7�7�7�7��&�&�w��8�8�8�8���
$��c�!�f�g�&>�?�?�+��K�%�%�c�*�*�*�*��K�%�%�c�*�*�*���!�!�#�#�#�
�n�d�#�#�.�.�t�W�c�B�B�B�B�Brc���tt|���|��|jr|�|d��dS|jr5|j�d��|j���dSdS)N�ok�.)	r#r!�
addSuccessr$r:r%rrr4r5s  �r
rHzTextTestResult.addSuccessYs����
�n�d�#�#�.�.�t�4�4�4��<�	 ����t�T�*�*�*�*�*�
�Y�	 ��K���c�"�"�"��K��������	 �	 rc���tt|���||��|jr|�|d��dS|jr5|j�d��|j���dSdS)Nr=r?)	r#r!�addErrorr$r:r%rrr4�rr.rDr)s   �r
rJzTextTestResult.addErroras����
�n�d�#�#�,�,�T�3�7�7�7��<�	 ����t�W�-�-�-�-�-�
�Y�	 ��K���c�"�"�"��K��������	 �	 rc���tt|���||��|jr|�|d��dS|jr5|j�d��|j���dSdS)Nr<r>)	r#r!�
addFailurer$r:r%rrr4rKs   �r
rMzTextTestResult.addFailureis����
�n�d�#�#�.�.�t�S�9�9�9��<�	 ����t�V�,�,�,�,�,�
�Y�	 ��K���c�"�"�"��K��������	 �	 rc�6��tt|���||��|jr+|�|d�|����dS|jr5|j�d��|j�	��dSdS)Nz
skipped {0!r}�s)
r#r!�addSkipr$r:�formatr%rrr4)rr.�reasonr)s   �r
rPzTextTestResult.addSkipqs����
�n�d�#�#�+�+�D�&�9�9�9��<�	 ����t�_�%;�%;�F�%C�%C�D�D�D�D�D�
�Y�	 ��K���c�"�"�"��K��������	 �	 rc�J��tt|���||��|jr5|j�d��|j���dS|jr5|j�d��|j���dSdS)Nzexpected failure�x)	r#r!�addExpectedFailurer$rrr4r%rrKs   �r
rUz!TextTestResult.addExpectedFailureys����
�n�d�#�#�6�6�t�S�A�A�A��<�	 ��K��� 2�3�3�3��K��������
�Y�	 ��K���c�"�"�"��K��������	 �	 rc�H��tt|���|��|jr5|j�d��|j���dS|jr5|j�d��|j���dSdS)Nzunexpected success�u)	r#r!�addUnexpectedSuccessr$rrr4r%rr5s  �r
rXz#TextTestResult.addUnexpectedSuccess�s����
�n�d�#�#�8�8��>�>�>��<�	 ��K��� 4�5�5�5��K��������
�Y�	 ��K���c�"�"�"��K��������	 �	 rc��|js|jr2|j���|j���|�d|j��|�d|j��t|dd��}|ro|j�|j	��|D]2}|j�d|�
|�������3|j���dSdS)Nr=r<�unexpectedSuccessesrzUNEXPECTED SUCCESS: )r%r$rrr4�printErrorList�errors�failuresr�
separator1r0)rrZr.s   r
�printErrorszTextTestResult.printErrors�s���9�	 ���	 ��K���!�!�!��K���������G�T�[�1�1�1����F�D�M�2�2�2�%�d�,A�2�F�F���	 ��K�����0�0�0�+�
X�
X����#�#�$V�4�;N�;N�t�;T�;T�$V�$V�W�W�W�W��K��������		 �	 rc�b�|D]�\}}|j�|j��|j�|�d|�|������|j�|j��|j�d|z��|j�����dS)Nz: z%s)rrr^r0�
separator2r4)r�flavourr\r.rDs     r
r[zTextTestResult.printErrorList�s����	 �	 �I�D�#��K�����0�0�0��K���G�G�G�D�4G�4G��4M�4M�4M� N�O�O�O��K�����0�0�0��K����s�
�+�+�+��K�������	 �	 r)rrrr^rarr0r3r:rBrHrJrMrPrUrXr_r[�
__classcell__)r)s@r
r!r!sR���������J��J���������"�"�"�"�"����
C�
C�
C�
C�
C� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � rr!c�2�eZdZ	eZ		d	dd�d�Zd�Zd�ZdS)
�TextTestRunnerNTrF)�	tb_localsc��	|�tj}t|��|_||_||_||_||_||_||_	|�	||_
dSdSr
)�sys�stderrrrr&r(�failfast�bufferrf�warnings�resultclass)	rrr&r(rjrkrmrlrfs	         r
rzTextTestRunner.__init__�sk��	�
�>��Z�F�'��/�/���(���"��� ��
����"��� ��
��"�*�D����#�"rc�N�|�|j|j|j��Sr
)rmrr&r()rs r
�_makeResultzTextTestRunner._makeResult�s!�������T�->���O�O�Orc���	|���}t|��|j|_|j|_|j|_tj��5|jr>tj|j��|jdvrtjdtd���tj��}t|dd��}|�
|��	||��t|dd��}|�
|��n##t|dd��}|�|��wwxYwtj��}ddd��n#1swxYwY||z
}|j
��t|d��r|j�|j��|j}|j�d||d	krd
pd|fz��|j���dx}	x}
}	t't(|j|j|jf��}|\}	}
}n#t0$rYnwxYwg}
|j��sw|j�d
��t)|j��t)|j��}}|r|
�d|z��|r|
�d|z��n|j�d��|r|
�d|z��|	r|
�d|	z��|
r|
�d|
z��|
r2|j�dd�|
���d���n|j�d��|j���|S)N)�default�always�modulezPlease use assert\w+ instead.)�category�message�startTestRun�stopTestRunrazRan %d test%s in %.3fsrrO�r�FAILEDzfailures=%dz	errors=%d�OKz
skipped=%dzexpected failures=%dzunexpected successes=%dz (z, �)r) rorrjrkrfrl�catch_warnings�simplefilter�filterwarnings�DeprecationWarning�time�perf_counterrr_�hasattrrrra�testsRun�map�len�expectedFailuresrZ�skippedr�
wasSuccessfulrr]r\�appendr,r4)rr.r�	startTimervrw�stopTime�	timeTaken�run�
expectedFailsrZr��results�infos�failed�erroreds                r
r�zTextTestRunner.run�s��0��!�!�#�#���v�����-������
��>���
�
$�
&�
&�	+�	+��}�
F��%�d�m�4�4�4��=�$9�9�9��+�H�%7�$D�F�F�F�F��)�+�+�I�"�6�>�4�@�@�L��'������
"���V����%�f�m�T�B�B���*��K�M�M�M���&�f�m�T�B�B���*��K�M�M�M�M�+�����(�*�*�H�/	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+����	+�	+�	+�	+�0�y�(�	��������6�<�(�(�	3��K���� 1�2�2�2��o������4� �#��(�"2�s�"8�b�)�D�E�	F�	F�	F��������89�9�
�9�+�g�	B��#�� 7� &� :� &�� 0�1�1�G�;B�7�M�.�����	�	�	��D�	����
��#�v�#�%�%�	$��K���h�'�'�'�!�&�/�2�2�C��
�4F�4F�G�F��
5����]�V�3�4�4�4��
4����[�7�2�3�3�3���K���d�#�#�#��	1��L�L���/�0�0�0��	A��L�L�/�-�?�@�@�@��	J��L�L�2�5H�H�I�I�I��	$��K����4�9�9�U�+;�+;�+;�+;� =�>�>�>�>��K���d�#�#�#���������
s=�A6D>�C<�D>�< D�D>�>E�E�'H	�	
H�H)NTrFFNN)rrrr!rmrror�rrr
rere�sm�������
!�K�AB�JN�+�#�+�+�+�+�+�(P�P�P�G�G�G�G�Grre)rhr�rlrxr�caser�signalsr�
__unittest�objectr�
TestResultr!rerrr
�<module>r�s����
�
�
�
���������������������#�#�#�#�#�#�
�
�
�
�
�
�
��
�
�
� @ �@ �@ �@ �@ �V�&�@ �@ �@ �Ff�f�f�f�f�V�f�f�f�f�fr

?>