ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib64/python3.11/site-packages/tap/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/tap/__pycache__/runner.cpython-311.pyc

�

�܋fW���ddlZddlmZmZddlmZddlZddlmZddl	m
Z
Gd�de��Ze
��ZGd�d	e��Z
dS)
�N)�TextTestResult�TextTestRunner)�_WritelnDecorator)�	formatter)�Trackerc�~��eZdZdZ�fd�Z�fd�Z�fd�Z�fd�Z�fd�Z�fd�Z	�fd�Z
�fd	�Z�fd
�Zd�Z
d�Z�xZS)
�
TAPTestResultNc�\��tt|���|||��dS�N)�superr	�__init__)�self�stream�descriptions�	verbosity�	__class__s    ��[/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/tap/runner.pyr
zTAPTestResult.__init__s+���
�m�T�"�"�+�+�F�L�)�L�L�L�L�L�c���tt|���|||��|�Ytj|��}|j�|�|��|�|��|���dS|j�	|�|��|�|����dS�N��diagnostics)
rr	�
addSubTestr�format_exception�tracker�
add_not_ok�	_cls_name�_description�add_ok)r�test�subtest�errrrs     �rrzTAPTestResult.addSubTests����
�m�T�"�"�-�-�d�G�S�A�A�A��?�#�4�S�9�9�K��L�#�#����t�$�$��!�!�'�*�*�'�
$�
�
�
�
�
�
�L������t� 4� 4�d�6G�6G��6P�6P�Q�Q�Q�Q�Qrc���tt|�����|j���dS)z>Once the test run is complete, generate each of the TAP files.N)rr	�stopTestRunr�generate_tap_reports)rrs �rr$zTAPTestResult.stopTestRuns9���
�m�T�"�"�.�.�0�0�0���)�)�+�+�+�+�+rc���tt|���||��tj|��}|j�|�|��|�|��|���dSr)	rr	�addErrorrrrrrr�rr r"rrs    �rr'zTAPTestResult.addError"s}���
�m�T�"�"�+�+�D�#�6�6�6��0��5�5�������N�N�4� � �$�"3�"3�D�"9�"9�{�	 �	
�	
�	
�	
�	
rc���tt|���||��tj|��}|j�|�|��|�|��|���dSr)	rr	�
addFailurerrrrrrr(s    �rr*zTAPTestResult.addFailure)s}���
�m�T�"�"�-�-�d�C�8�8�8��0��5�5�������N�N�4� � �$�"3�"3�D�"9�"9�{�	 �	
�	
�	
�	
�	
rc����tt|���|��|j�|�|��|�|����dSr)rr	�
addSuccessrrrr�rr rs  �rr,zTAPTestResult.addSuccess0sY���
�m�T�"�"�-�-�d�3�3�3�����D�N�N�4�0�0�$�2C�2C�D�2I�2I�J�J�J�J�Jrc����tt|���||��|j�|�|��|�|��|��dSr)rr	�addSkipr�add_skiprr)rr �reasonrs   �rr/zTAPTestResult.addSkip4s]���
�m�T�"�"�*�*�4��8�8�8�����d�n�n�T�2�2�D�4E�4E�d�4K�4K�V�T�T�T�T�Trc�0��tt|���||��tj|��}|j�|�|��|�|��d�	d��|���dS)N�TODO {}z(expected failure)r)
rr	�addExpectedFailurerrrrrr�formatr(s    �rr4z TAPTestResult.addExpectedFailure8s����
�m�T�"�"�5�5�d�C�@�@�@��0��5�5�������N�N�4� � ����d�#�#����1�2�2�#�		 �	
�	
�	
�	
�	
rc���tt|���|��|j�|�|��|�|��d�d����dS)Nr3z(unexpected success))rr	�addUnexpectedSuccessrrrrr5r-s  �rr7z"TAPTestResult.addUnexpectedSuccessBsw���
�m�T�"�"�7�7��=�=�=������N�N�4� � ����d�#�#����3�4�4�	
�	
�	
�	
�	
rc��|jjSr)r�__name__�rr s  rrzTAPTestResult._cls_nameJs
���~�&�&rc�L�|jr{	|j�t|��|���pd���S#t$r0tjd�|j�����YnwxYw|���pt|��S)N�)�method_name�short_descriptionz^Bad format string: {format}
Replacement options are: {{short_description}} and {{method_name}})r5)�FORMATr5�str�shortDescription�KeyError�sys�exitr:s  rrzTAPTestResult._descriptionMs����;�	�

��{�)�)� #�D�	�	�&*�&;�&;�&=�&=�&C��*������
�
�
���&�&,�f�D�K�f�&@�&@������
�����$�$�&�&�3�#�d�)�)�3s�<A�7B�?B)r9�
__module__�__qualname__r?r
rr$r'r*r,r/r4r7rr�
__classcell__)rs@rr	r	
s7�������
�F�M�M�M�M�M�
R�
R�
R�
R�
R�,�,�,�,�,�

�
�
�
�
�
�
�
�
�
�K�K�K�K�K�U�U�U�U�U�
�
�
�
�
�
�
�
�
�
�'�'�'�4�4�4�4�4�4�4rr	c�z�eZdZdZeZd�Zd�Zed���Z	ed���Z
ed���Zed���ZdS)	�
TAPTestRunnerzzA test runner that will behave exactly like TextTestRunner and will
    additionally generate TAP files for each test casec��tttjd����|_|t
_tjt
_dS)z�Set the streaming boolean option to stream TAP directly to stdout.

        The test runner default output will be suppressed in favor of TAP.
        �wN)	r�open�os�devnullr�_tracker�	streamingrC�stdout)rrPs  r�
set_streamzTAPTestRunner.set_streamns4��
(��R�Z��(=�(=�>�>���&����*����rc�j�|�|j|j|j��}t|_|Sr)�resultclassrrrrOr)r�results  r�_makeResultzTAPTestRunner._makeResultws,���!�!�$�+�t�/@�$�.�Q�Q��!����
rc��|t_dS)ziSet the output directory so that TAP files are written to the
        specified outdir location.
        N)rO�outdir)�clsrXs  r�
set_outdirzTAPTestRunner.set_outdir|s��!����rc��|t_dS)z,Set the tracker to use a single output file.N)rO�combined)rYr\s  r�set_combinedzTAPTestRunner.set_combined�s��%����rc��|t_dS)zSet the header display flag.N)rO�header)rYr_s  r�
set_headerzTAPTestRunner.set_header�s��!����rc��|t_dS)z�Set the format of each test line.

        The format string can use:
        * {method_name}: The test method name
        * {short_description}: The test's docstring short description
        N)r	r?)rY�fmts  r�
set_formatzTAPTestRunner.set_format�s�� #�
���rN)
r9rErF�__doc__r	rTrRrV�classmethodrZr]r`rc�rrrIrIhs�������:�:� �K�%�%�%����
�!�!��[�!��%�%��[�%��!�!��[�!��#�#��[�#�#�#rrI)rM�unittestrr�unittest.runnerrrC�tapr�tap.trackerrr	rOrIrfrr�<module>rks���	�	�	�	�3�3�3�3�3�3�3�3�-�-�-�-�-�-�
�
�
�
�������������Q4�Q4�Q4�Q4�Q4�N�Q4�Q4�Q4�v�7�9�9��.#�.#�.#�.#�.#�N�.#�.#�.#�.#�.#r

Zerion Mini Shell 1.0