%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/setuptools/command/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/setuptools/command/__pycache__/test.cpython-312.pyc

�


_�d�����ddlZddlZddlZddlZddlZddlZddlmZmZddl	m
Z
ddlmZddlm
Z
mZmZmZmZmZmZddlmZddlmZdd	lmZdd
lmZGd�de�ZGd
�d�ZGd�de�Zy)�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�Zy)�ScanningLoaderc�L�tj|�t�|_y�N)r�__init__�set�_visited��selfs �9/usr/lib/python3/dist-packages/setuptools/command/test.pyrzScanningLoader.__init__s�����D�!����
�Nc��||jvry|jj|�g}|jtj||��t|d�r|j|j
��t|d�r�t|jd�D]{}|jd�r|dk7r|jdz|ddz}n-t|j|d	z�r|jdz|z}n�\|j|j|���}t|�d
k7r|j|�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.loadTestsFromModules���T�]�]�"���
�
���&�!���
���Z�3�3�D�&�A�B��6�-�.��L�L��0�0�2�3��6�:�&�(����"�=�
@���=�=��'�D�M�,A� &���#� 5��S�b�	� A�I�&�v����~�8M�N�$*�O�O�c�$9�D�$@�	� ����T�3�3�I�>�?�
@��u�:��?��?�?�5�)�)���8�Orr)r)�
__module__�__qualname__rr'�rrrrs���rrc��eZdZd�Zdd�Zy)�NonDataPropertyc��||_yr��fget)rr:s  rrzNonDataProperty.__init__Cs	����	rNc�,�|�|S|j|�Srr9)r�obj�objtypes   r�__get__zNonDataProperty.__get__Fs���;��K��y�y��~�rr)r)r3r4rr>r5rrr7r7Bs���rr7c���eZdZdZdZgd�Zd�Zd�Zed��Z	d�Z
d�Zejgfd	��Zeejd
���Zed��Zd�Zd
�Zed��Zeed���Zy)�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|_yr)�
test_suite�test_module�test_loader�test_runnerrs r�initialize_optionsztest.initialize_options[s!�������������rc��|jr|jr
d}t|��|j�<|j�|jj|_n|jdz|_|j�t|jdd�|_|j�d|_|j�t|jdd�|_yy)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�"3�">�">���"&�"2�"2�]�"B������#�&�t�'8�'8�-��N�D�����#�G�D�����#�&�t�'8�'8�-��N�D��$rc�4�t|j��Sr)�list�
_test_argsrs r�	test_argsztest.test_argsss���D�O�O�%�&�&rc#�K�|jsd��|jrd��|jr|j��yy�w)N�discoverz	--verbose)rE�verbosers rrQztest._test_argsws6����������<�<����?�?��/�/�!��s�=?c�\�|j�5|�ddd�y#1swYyxYw)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*���
%�
%�
'�	��F�	�	�	�s�"�+c#��K�|jd�|jdd��|jd�|jd�}tjdd}tj
j
�}	t|j�}tjjd|�tj�td��t|j�d|j���|j!|g�5d��ddd�|tjddtj
j#�tj
j%|�tj�y#1swY�nxYw#|tjddtj
j#�tj
j%|�tj�wxYw�w)N�egg_info�	build_extr$)�inplacerc�"�|j�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�sY��������$�	
�!�!�+�q�!�9�����%��+�+�J�7���8�8�A�;���k�k�&�&�(��	#�)�&�/�/�:�L��H�H�O�O�A�|�,�� � �"�#�$@�A������1C�1C�D�E��)�)�<�.�9�
��
�#�C�H�H�Q�K��K�K�����K�K���{�+�� � �"�

�
��#�C�H�H�Q�K��K�K�����K�K���{�+�� � �"�s9�A8G-�;BF�E8�F�A%G-�8F�=F�A&G*�*G-c#�hK�t�}tjjd|�}tjjdd�}	tjjt
|��}td||g�}tjj|�}|r|tjd<d��||ur!tjjdd�y|tjd<y#||ur!tjjdd�w|tjd<wxYw�w)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�Z�^�^�L�"�=��	;��Z�Z�_�_�_�U�%;�<�F��T�F�,>�#?�@�G��z�z���w�/�H��+3��
�
�<�(���'�)��
�
���|�T�2�+:��
�
�<�(���'�)��
�
���|�T�2�+:��
�
�<�(�s�AD2�A.C5�<9D2�5:D/�/D2c��|j|j�}|j|jxsg�}|jd�|jj	�D��}tj|||�S)z�
        Install the requirements indicated by self.distribution and
        return an iterable of the dists that were built.
        c3�dK�|](\}}|jd�rt|dd�r|���*y�w)�:r$N)�
startswithr)�.0�k�vs   r�	<genexpr>z%test.install_dists.<locals>.<genexpr>�s5����%
���1��|�|�C� �_�Q�q�r�U�%;�
�%
�s�.0)�fetch_build_eggs�install_requires�
tests_require�extras_require�items�	itertools�chain)r`�ir_d�tr_d�er_ds    r�
install_distsztest.install_dists�sv���$�$�T�%:�%:�;���$�$�T�%7�%7�%=�2�>���$�$�%
��+�+�1�1�3�%
�
��
���t�T�4�0�0rc��|jdtj�|j|j�}dj|j�}|jr|jd|z�y|jd|z�ttjd�|�}|j|�5|j�5|j�ddd�ddd�y#1swY�xYw#1swYyxYw)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�H�	
��,�,�T�->�->�?���h�h�t�z�z�"���<�<��M�M�3�c�9�:���
�
�n�s�*�+��H�'�'�
�3�_�E��
�
%�
%�e�
,�	!��)�)�+�
!���� �
!�	!�	!�
!�
!��	!�	!�s$�<C;�
C/�C;�/C8	�4C;�;Dc	�Z�tjdd|j|j|j�|j|j
�d��}|jj�s:d|jz}|j|tj�t|��y)NF)�
testLoader�
testRunner�exitzTest failed: %s)�unittest�mainr��_resolve_as_eprGrH�result�
wasSuccessfulr�r�ERRORr)rr@rMs   rr�ztest.run_tests�s����}�}����J�J��*�*�4�+;�+;�<��*�*�4�+;�+;�<��

���{�{�(�(�*�#�d�k�k�1�C��M�M�#�s�y�y�)� ��%�%�+rc�"�dg|jzS)Nr�)rRrs rr�z
test._argv�s���|�d�n�n�,�,rc�X�tj|dd��j��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�s(��L�x�"�"��4�t�D�I�I�K�M�MrN)r)r3r4�__doc__�description�user_optionsrIrNr7rRrQrY�
contextlib�contextmanagerrW�staticmethodrmr�r�r��propertyr�rr�r5rrr@r@Ls���8�D�K��L� �O�$�'��'�"�����02�#��#�4����;���;�0�1��1�!�.&��-��-���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�sd��	��
����A������"��<�8�$�Z�$�P��nN�7�nNr

Zerion Mini Shell 1.0