Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/setuptools/command/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/setuptools/command/__pycache__/test.cpython-311.pyc

�

�܋f����ddlZddlZddlZddlZddlZddlZddlmZmZddl	m
Z
ddlmZddlm
Z
mZmZmZmZmZmZddlmZddlmZdd	lmZdd
lmZGd�de��ZGd
�d��ZGd�de��ZdS)�N)�DistutilsError�DistutilsOptionError)�log)�
TestLoader)�resource_listdir�resource_exists�normalize_path�working_set�evaluate_marker�add_activation_listener�require�)�metadata)�Command)�unique_everseen)�	pass_nonec��eZdZd�Zdd�ZdS)�ScanningLoaderc�T�tj|��t��|_dS�N)r�__init__�set�_visited��selfs �h/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/setuptools/command/test.pyrzScanningLoader.__init__s"����D�!�!�!�����
�
�
�Nc��||jvrdS|j�|��g}|�tj||����t|d��r'|�|�����t|d��r�t|jd��D]�}|�	d��r|dkr|jdz|dd�z}n't|j|d	z��r|jdz|z}n�Z|�|�|������t|��d
kr|�
|��S|dS)aReturn a suite of all tests cases contained in the given module

        If the module is a package, load tests from all the modules in it.
        If the module has an ``additional_tests`` function, call it and add
        the return value to the tests.
        N�additional_tests�__path__�z.pyz__init__.py�.���z/__init__.py�r)r�add�appendr�loadTestsFromModule�hasattrrr�__name__�endswithr�loadTestsFromName�len�
suiteClass)r�module�pattern�tests�file�	submodules      rr'z"ScanningLoader.loadTestsFromModulesf���T�]�"�"��4��
���&�!�!�!���
���Z�3�D�&�A�A�B�B�B��6�-�.�.�	4��L�L��0�0�2�2�3�3�3��6�:�&�&�		@�(���"�=�=�
@�
@���=�=��'�'�!�D�M�,A�,A� &��#� 5��S�b�S�	� A�I�I�&�v���~�8M�N�N�!�$*�O�c�$9�D�$@�	�	� ����T�3�3�I�>�>�?�?�?�?��u�:�:��?�?��?�?�5�)�)�)���8�Orr)r)�
__module__�__qualname__rr'�rrrrs7��������������rrc��eZdZd�Zdd�ZdS)�NonDataPropertyc��||_dSr��fget)rr:s  rrzNonDataProperty.__init__Cs
����	�	�	rNc�4�|�|S|�|��Srr9)r�obj�objtypes   r�__get__zNonDataProperty.__get__Fs���;��K��y�y��~�~�rr)r)r3r4rr>r5rrr7r7Bs7��������������rr7c��eZdZdZdZgd�Zd�Zd�Zed���Z	d�Z
d�Zej
dd
���Zeej
d�����Zed���Zd
�Zd�Zed���Zeed�����ZdS)�testz.Command to run unit tests after in-place buildz0run unit tests after in-place build (deprecated)))ztest-module=�mz$Run 'test_suite' in specified module)ztest-suite=�sz9Run single test, case or suite (e.g. 'module.test_suite'))ztest-runner=�rzTest runner to usec�>�d|_d|_d|_d|_dSr)�
test_suite�test_module�test_loader�test_runnerrs r�initialize_optionsztest.initialize_options[s'���������������rc�J�|jr|jrd}t|���|j�(|j�|jj|_n|jdz|_|j�t|jdd��|_|j�d|_|j�t|jdd��|_dSdS)Nz1You may specify a module or a suite, but not bothz.test_suiterGz&setuptools.command.test:ScanningLoaderrH)rErFr�distributionrG�getattrrH)r�msgs  r�finalize_optionsztest.finalize_optionsas����?�	,�t�/�	,�E�C�&�s�+�+�+��?�"���'�"&�"3�">����"&�"2�]�"B�����#�&�t�'8�-��N�N�D����#�G�D����#�&�t�'8�-��N�N�D����$�#rc�D�t|�����Sr)�list�
_test_argsrs r�	test_argsztest.test_argsss���D�O�O�%�%�&�&�&rc#�ZK�|jsdV�|jrdV�|jr|jV�dSdS)N�discoverz	--verbose)rE�verbosers rrQztest._test_argswsZ������	������<�	������?�	"��/�!�!�!�!�!�	"�	"rc�t�|���5|��ddd��dS#1swxYwYdS)zI
        Backward compatibility for project_on_sys_path context.
        N)�project_on_sys_path)r�funcs  r�with_project_on_sys_pathztest.with_project_on_sys_paths����
%�
%�
'�
'�	�	��D�F�F�F�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�-�1�1r5c#�K�|�d��|�dd���|�d��|�d��}tjdd�}tj���}	t|j��}tj�	d|��tj��td���t|j�d|j����|�|g��5dV�ddd��n#1swxYwY|tjdd�<tj���tj�|��tj��dS#|tjdd�<tj���tj�|��tj��wxYw)N�egg_info�	build_extT)�inplacerc�*�|���Sr)�activate)�dists r�<lambda>z*test.project_on_sys_path.<locals>.<lambda>�s�������rz==)�run_command�reinitialize_command�get_finalized_command�sys�path�modules�copyr	�egg_base�insertr
rrr
�egg_name�egg_version�paths_on_pythonpath�clear�update)r�
include_dists�ei_cmd�old_path�old_modules�project_paths      rrWztest.project_on_sys_path�s���������$�$�$�	
�!�!�+�t�!�<�<�<�����%�%�%��+�+�J�7�7���8�A�A�A�;���k�&�&�(�(��	#�)�&�/�:�:�L��H�O�O�A�|�,�,�,�� �"�"�"�#�$@�$@�A�A�A�������1C�1C�D�E�E�E��)�)�<�.�9�9�
�
�����
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�#�C�H�Q�Q�Q�K��K�������K���{�+�+�+�� �"�"�"�"�"��#�C�H�Q�Q�Q�K��K�������K���{�+�+�+�� �"�"�"�"���s2�BF�D(�F�(D,�,F�/D,�0F�A#G9c#�hK�t��}tj�d|��}tj�dd��}	tj�t
|����}td||g��}tj�|��}|r|tjd<dV�||ur"tj�dd��dS|tjd<dS#||ur!tj�dd��n|tjd<wxYw)z�
        Add the indicated paths to the head of the PYTHONPATH environment
        variable so that subprocesses will also see the packages at
        these paths.

        Do this in a context that restores the value on exit.
        �
PYTHONPATHr!N)	�object�os�environ�get�pathsep�joinr�filter�pop)�paths�nothing�orig_pythonpath�current_pythonpath�prefix�to_join�new_paths       rrmztest.paths_on_pythonpath�s�����(�(���*�.�.��w�?�?���Z�^�^�L�"�=�=��	;��Z�_�_�_�U�%;�%;�<�<�F��T�F�,>�#?�@�@�G��z���w�/�/�H��
4�+3��
�<�(��E�E�E��'�)�)��
���|�T�2�2�2�2�2�+:��
�<�(�(�(���'�)�)��
���|�T�2�2�2�2�+:��
�<�(�:�:�:�:s
�A2C;�;6D1c��|�|j��}|�|jpg��}|�d�|j���D����}tj|||��S)z�
        Install the requirements indicated by self.distribution and
        return an iterable of the dists that were built.
        c3�xK�|]5\}}|�d���t|dd����1|V��6dS)�:r$N)�
startswithr)�.0�k�vs   r�	<genexpr>z%test.install_dists.<locals>.<genexpr>�sf����%
�%
���1��|�|�C� � �%
�&5�Q�q�r�r�U�%;�%;�%
�
�%
�%
�%
�%
�%
�%
r)�fetch_build_eggs�install_requires�
tests_require�extras_require�items�	itertools�chain)r`�ir_d�tr_d�er_ds    r�
install_distsztest.install_dists�s����$�$�T�%:�;�;���$�$�T�%7�%=�2�>�>���$�$�%
�%
��+�1�1�3�3�%
�%
�%
�
�
��
��t�T�4�0�0�0rc�@�|�dtj��|�|j��}d�|j��}|jr|�d|z��dS|�d|z��ttj
d��|��}|�|��5|���5|�
��ddd��n#1swxYwYddd��dS#1swxYwYdS)Nz�WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.� zskipping "%s" (dry run)zrunning "%s"�location)�announcer�WARNr�rKr|�_argv�dry_run�map�operator�
attrgetterrmrW�	run_tests)r�installed_dists�cmdrs    r�runztest.run�s����
�
�
�
�H�	
�	
�	
��,�,�T�->�?�?���h�h�t�z�"�"���<�	��M�M�3�c�9�:�:�:��F��
�
�n�s�*�+�+�+��H�'�
�3�3�_�E�E��
�
%�
%�e�
,�
,�	!�	!��)�)�+�+�
!�
!���� � � �
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!����
!�
!�
!�
!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!�	!�	!s6�D�C;�/D�;C?	�?D�C?	�D�D�Dc	�H�tjdd|j|�|j��|�|j��d���}|j���s9d|jz}|�|tj
��t|���dS)NF)�
testLoader�
testRunner�exitzTest failed: %s)�unittest�mainr��_resolve_as_eprGrH�result�
wasSuccessfulr�r�ERRORr)rr@rMs   rr�ztest.run_tests�s����}����J��*�*�4�+;�<�<��*�*�4�+;�<�<��

�
�
���{�(�(�*�*�	&�#�d�k�1�C��M�M�#�s�y�)�)�)� ��%�%�%�	&�	&rc��dg|jzS)Nr�)rRrs rr�z
test._argv�s���|�d�n�,�,rc�d�tj|dd��������S)zu
        Load the indicated attribute value, called, as a as if it were
        specified as an entry point.
        N)�value�name�group)r�
EntryPoint�load)�vals rr�ztest._resolve_as_ep�s1��L�x�"��4�t�D�D�D�I�I�K�K�M�M�MrN)r5)r)r3r4�__doc__�description�user_optionsrIrNr7rRrQrY�
contextlib�contextmanagerrW�staticmethodrmr�r�r��propertyr�rr�r5rrr@r@LsU������8�8�D�K����L� � � �O�O�O�$�'�'��_�'�"�"�"������#�#�#���#�4���;�;����\�;�0�1�1��\�1�!�!�!�.&�&�&��-�-��X�-���N�N��Y��\�N�N�Nrr@)rxr�rer�r�r��distutils.errorsrr�	distutilsrr�
pkg_resourcesrrr	r
rrr
�
_importlibr�
setuptoolsr� setuptools.extern.more_itertoolsr�"setuptools.extern.jaraco.functoolsrrr7r@r5rr�<module>r�s���	�	�	�	�����
�
�
�
�������������A�A�A�A�A�A�A�A�������������������������������"�!�!�!�!�!�������<�<�<�<�<�<�8�8�8�8�8�8�$�$�$�$�$�Z�$�$�$�P��������nN�nN�nN�nN�nN�7�nN�nN�nN�nN�nNr

Hacked By AnonymousFox1.0, Coded By AnonymousFox