Hacked By AnonymousFox

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

�

�f�$���dZddlZddlZddlZddlmZddlmZddlm	Z	dZ
Gd�d	e��ZGd
�dej
��ZGd�d
e��ZdS)z
Running tests�N�)�result)�_SubTest)�registerResultTc�&�eZdZdZd�Zd�Zdd�ZdS)�_WritelnDecoratorz@Used to decorate file-like objects with a handy 'writeln' methodc��||_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__�__doc__rrr�rr
rrsL������J�J����)�)�)�
�����rrc���eZdZdZdZdZ�fd�Zd�Z�fd�Zd�Z	�fd�Z
�fd	�Z�fd
�Z�fd�Z
�fd�Z�fd
�Z�fd�Zd�Zd�Z�xZS)�TextTestResultzhA test result class that can print formatted text results to a stream.

    Used by TextTestRunner.
    zF======================================================================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%rrr1�flushr(�rr/r*s  �r
r4zTextTestResult.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  r3T)�
isinstancerr(rrrr1r5)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&rrr5r$r"�
addSubTest)rr/�subtest�errr*s    �r
rCzTextTestResult.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&rrr5r6s  �r
rIzTextTestResult.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&rrr5�rr/rEr*s   �r
rKzTextTestResult.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&rrr5rLs   �r
rNzTextTestResult.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&rrr5)rr/�reasonr*s   �r
rQzTextTestResult.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%rrr5r&rrLs   �r
rVz!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%rrr5r&rr6s  �r
rYz#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=�unexpectedSuccessesr zUNEXPECTED SUCCESS: )r&r%rrr5�printErrorList�errors�failuresr�
separator1r1)rr[r/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_r1�
separator2r5)r�flavourr]r/rEs     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)rrrrr_rbrr1r4r;rCrIrKrNrQrVrYr`r\�
__classcell__)r*s@r
r"r"sW����������J��J���������"�"�"�"�"����
C�
C�
C�
C�
C� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � rr"c�4�eZdZdZeZ		d
dd�d�Zd�Zd	�ZdS)�TextTestRunnerz�A test runner class that displays results in textual form.

    It prints out the names of tests as they are run, errors as they
    occur, and a summary of the results at the end of the test run.
    NTrF)�	tb_localsc��|�tj}t|��|_||_||_||_||_||_||_	|�	||_
dSdS)z�Construct a TextTestRunner.

        Subclasses should accept **kwargs to ensure compatibility as the
        interface changes.
        N)�sys�stderrrrr'r)�failfast�bufferrg�warnings�resultclass)	rrr'r)rkrlrnrmrgs	         r
rzTextTestRunner.__init__�sf���>��Z�F�'��/�/���(���"��� ��
����"��� ��
��"�*�D����#�"rc�N�|�|j|j|j��Sr
)rnrr'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
krdpd|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)z&Run the given test case or test suite.)�default�always�modulezPlease use assert\w+ instead.)�category�message�startTestRunN�stopTestRunrbzRan %d test%s in %.3fsrrP�r�FAILEDzfailures=%dz	errors=%d�OKz
skipped=%dzexpected failures=%dzunexpected successes=%dz (z, �)r) rprrkrlrgrm�catch_warnings�simplefilter�filterwarnings�DeprecationWarning�time�perf_counterrr`�hasattrrrrb�testsRun�map�len�expectedFailuresr[�skippedr�
wasSuccessfulrr^r]�appendr-r5)rr/r�	startTimerwrx�stopTime�	timeTaken�run�
expectedFailsr[r��results�infos�failed�erroreds                r
r�zTextTestRunner.run�s���!�!�#�#���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)	rrrrr"rnrrpr�r rr
rfrf�sr��������
!�K�AB�JN�+�#�+�+�+�+�+�(P�P�P�G�G�G�G�Grrf)rrir�rmryr�caser�signalsr�
__unittest�objectr�
TestResultr"rfr rr
�<module>r�s�����
�
�
�
���������������������#�#�#�#�#�#�
�
�
�
�
�
�
��
�
�
� @ �@ �@ �@ �@ �V�&�@ �@ �@ �Ff�f�f�f�f�V�f�f�f�f�fr

Hacked By AnonymousFox1.0, Coded By AnonymousFox