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__/loader.cpython-311.pyc

�

�܋f���V�ddlZddlZddlmZddlmZddlmZGd�de��Z	dS)�N)�Adapter)�Parser)�Rulesc�P�eZdZdZeddg��Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
S)�Loaderz*Load TAP lines into unittest-able objects.�
diagnostic�unknownc�,�t��|_dS)N)r�_parser)�selfs �[/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/tap/loader.py�__init__zLoader.__init__s���x�x�����c���tj��}|D]`}tj�|��r|�||���8|�|�|�����a|S)z�Load any files found into a suite.

        Any directories are walked and their files are added as TAP files.

        :returns: A ``unittest.TestSuite`` instance
        )�unittest�	TestSuite�os�path�isdir�_find_tests_in_directory�addTest�load_suite_from_file)r�files�suite�filepaths    r
�loadzLoader.loads{���"�$�$���	C�	C�H��w�}�}�X�&�&�
C��-�-�h��>�>�>�>��
�
�d�7�7��A�A�B�B�B�B��rc��tj��}t||��}tj�|��s|���|S|j�|��}|�	||||��S)z{Load a test suite with test lines from the provided TAP file.

        :returns: A ``unittest.TestSuite`` instance
        )
rrrrr�exists�handle_file_does_not_existr�
parse_file�_load_lines)r�filenamer�rules�line_generators     r
rzLoader.load_suite_from_file s}��
�"�$�$���h��&�&���w�~�~�h�'�'�	��,�,�.�.�.��L���0�0��:�:������.�%��G�G�Grc��tj��}td|��}|j���}|�d|||��S)z}Load a test suite with test lines from the TAP stream on STDIN.

        :returns: A ``unittest.TestSuite`` instance
        �stream)rrrr�parse_stdinr!)rrr#r$s    r
�load_suite_from_stdinzLoader.load_suite_from_stdin/sN��
�"�$�$���h��&�&����1�1�3�3������.�%��G�G�Grc���tj|��D]S\}}}|D]J}tj�||��}|�|�|�����K�TdS)z;Find test files in the directory and add them to the suite.N)r�walkr�joinrr)r�	directoryr�dirpath�dirnames�	filenamesr"rs        r
rzLoader._find_tests_in_directory9s��,.�G�I�,>�,>�	C�	C�(�G�X�y�%�
C�
C���7�<�<���:�:���
�
�d�7�7��A�A�B�B�B�B�
C�	C�	Crc��d}|D]�}|dz
}|j|jvr�|jdkr8|�t||����|����Y|jdkr7|jr|�|��|cS|�||����|jdkr|�|��|cS|jdkr|�	|����|�
|��|S)z7Load a suite with lines produced by the line generator.r��test�plan�bail�version)�category�
ignored_linesrr�saw_test�skip�handle_skipping_plan�saw_plan�handle_bail�saw_version_at�check)rr"r$rr#�line_counter�lines       r
r!zLoader._load_lines@s����"�	3�	3�D��A��L��}�� 2�2�2���}��&�&��
�
�g�h��5�5�6�6�6���� � � � ���&�(�(��9�!��.�.�t�4�4�4� �L�L�L����t�\�2�2�2�2���&�(�(��!�!�$�'�'�'�������)�+�+��$�$�\�2�2�2��
���L�!�!�!��rN)�__name__�
__module__�__qualname__�__doc__�setr7rrrr(rr!�rr
rr	s�������4�4��C��y�1�2�2�M� � � �
�
�
�
H�
H�
H�H�H�H�C�C�C�����rr)
rr�tap.adapterr�
tap.parserr�	tap.rulesr�objectrrFrr
�<module>rKs���	�	�	�	�����������������������O�O�O�O�O�V�O�O�O�O�Or

Zerion Mini Shell 1.0