PK APOCALYPSE V1

APOCALYPSE V1

Current Path : /opt/hc_python/lib/python3.12/site-packages/nose/__pycache__/
Upload File :
Current File : //opt/hc_python/lib/python3.12/site-packages/nose/__pycache__/selector.cpython-312.pyc

�

���g#���dZddlZddlZddlZddlmZddlmZmZm	Z	m
Z
mZmZeje�Zgd�Zej"j$Zej"j(Zej"j,Zej"j0Zej"j4Zej"j8ZGd�de�ZeZ Gd�d	e�Z!y)
z�
Test Selection
--------------

Test selection is handled by a Selector. The test loader calls the
appropriate selector method for each object it encounters that it
thinks may be a test.
�N)�Config)�split_test_name�src�getfilename�
getpackage�	ispackage�
is_executable)�Selector�defaultSelector�TestAddressc�F�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zy)r
z�Core test selector. Examines test candidates and determines whether,
    given the specified configuration, the test candidate should be selected
    as a test.
    c�>�|�
t�}|j|�y�N)r�	configure��self�configs  �</opt/hc_python/lib/python3.12/site-packages/nose/selector.py�__init__zSelector.__init__"s���>��X�F����v��c��||_|j|_|j|_|j|_|j|_|j
|_yr)r�exclude�ignoreFiles�include�plugins�	testMatch�matchrs  rrzSelector.configure'sE������~�~���!�-�-����~�~����~�~����%�%��
rc��|jj|�xsH|jxr:|jD�cgc]}|j|���c}D�cgc]}|s�|��	c}xrJ|jxs;|jD�cgc]}|j|���c}D�cgc]}|s�|��	c}Scc}wcc}wcc}wcc}w)z�Does the name match my requirements?

        To match, a name must match config.testMatch OR config.include
        and it must not match config.exclude
        )r�searchrr)r�name�inc�_f�excs     r�matcheszSelector.matches/s������"�"�4�(�V��\�\�U�@D���#M���C�J�J�t�$4��#M�T�#M�R�QS�b�#M�T���,�,�&�\�GK�|�|�*T�|��3�:�:�d�+;�|�*T�[�*T�B�XZ�R�*T�[�[�		��#M��T��*T��[s#�B2�B7�B7�B<�"C�*Cc�n�t|dd�}|�|}nU|jjd�xr7t|tj
�xs|j
|j�}|jj|�}|�tjd||�|}tjd||�|S)z�Is the class a wanted test class?

        A class must be a unittest.TestCase subclass, or match test name
        requirements. Classes that start with _ are always excluded.
        �__test__N�_�$Plugin setting selection of %s to %szwantClass %s? %s)�getattr�__name__�
startswith�
issubclass�unittest�TestCaser$r�	wantClass�log�debug)r�cls�declared�wanted�
plug_wantss     rr/zSelector.wantClass<s����3�
�D�1�����F��,�,�1�1�#�6�6�:�%�c�8�+<�+<�=�9�"�l�l�3�<�<�8�
��\�\�+�+�C�0�
��!��I�I�<�c�:�N��F��	�	�$�c�6�2��
rc��t|�}t|�rK|jxs;|jD�cgc]}|j|���c}D�cgc]}|s�|��	c}}nC|j	|�xs0|j
jxr||j
jv}|jj|�}|�tjd||�|}tjd||�|Scc}wcc}w)z�Is the directory a wanted test directory?

        All package directories match, so long as they do not match exclude. 
        All other directories must match test requirements.
        r(zwantDirectory %s? %s)�op_basenamerrrr$r�srcDirsr�
wantDirectoryr0r1)r�dirname�tailr#r"r4r5s       rr9zSelector.wantDirectoryQs����7�#���W���,�,�&�]�HL���+U���C�J�J�t�,<��+U�\�+U�R�Y[�b�+U�\�\�
��l�l�4�(�;��+�+�-�-�:�"�d�k�k�&9�&9�9�
��\�\�/�/��8�
��!��I�I�<��z�
+��F��	�	�(�'�6�:��
��,V��\s�C4�C9�C9c��t|�}|jD�cgc]}|j|�r|��}}|rtj	d|�y|j
js"t|�rtjd|�yt|�\}}|dk(}|xr|j|�}|jj|�}	|	�tj	d||	�|	}tj	d||�|Scc}w)aIs the file a wanted test file?

        The file must be a python source file and match testMatch or
        include, and not match exclude. Files that match ignore are *never*
        wanted, regardless of plugin, testMatch, include or exclude settings.
        z'%s matches ignoreFiles pattern; skippedFz%s is executable; skippedz.pyzplugin setting want %s to %szwantFile %s? %s)
r7rrr0r1r�
includeExer	�info�op_splitextr$r�wantFile)
r�file�base�ignore_this�ignore_matches�dummy�ext�pysrcr4r5s
          rr@zSelector.wantFilegs����4� ��:>�:J�:J�9�:J�;�)�0�0��6�'�:J��9���I�I�?��
���{�{�%�%�-��*=��H�H�0�$�7�� ��&�
��s��u����-�4�<�<��-���\�\�*�*�4�0�
��!��I�I�4�d�J�G��F��	�	�#�T�6�2��
��%9s�C>c�J�	t|d�r
|j}n|j}t	|dd�}|�|}n%|jd�xr|j
|�}|jj|�}|�|}tjd||�|S#t$rYywxYw)z)Is the function a test function?
        �compat_func_nameFr&Nr'zwantFunction %s? %s)�hasattrrIr*�AttributeErrorr)r+r$r�wantFunctionr0r1)r�function�funcnamer3r4r5s      rrLzSelector.wantFunction�s���	��x�!3�4�#�4�4��#�,�,���8�Z��6�����F�!�,�,�S�1�1�L�d�l�l�8�6L�F��\�\�.�.�x�8�
��!��F��	�	�'��6�:��
���	��	�s�%B�	B"�!B"c��	|j}|jd�ryt|dd�}|�|}n|j	|�}|j
j
|�}|�|}tjd||�|S#t$rYywxYw)z%Is the method a test method?
        Fr'r&NzwantMethod %s? %s)	r*rKr+r)r$r�
wantMethodr0r1)r�method�method_namer3r4r5s      rrPzSelector.wantMethod�s���	� �/�/�K��!�!�#�&���6�:�t�4�����F��\�\�+�.�F��\�\�,�,�V�4�
��!��F��	�	�%�v�v�6��
���	��	�s�A;�;	B�Bc��t|dd�}|�|}n>|j|jjd�d�xs|jdk(}|jj|�}|�|}tjd||�|S)z�Is the module a test module?

        The tail of the module name must match test requirements. One exception:
        we always want __main__.
        r&N�.����__main__zwantModule %s? %s)r)r$r*�splitr�
wantModuler0r1)r�moduler3r4r5s     rrXzSelector.wantModule�s����6�:�t�4�����F��\�\�&�/�/�"7�"7��"<�R�"@�A�6����:�5�
��\�\�,�,�V�4�
��!��F��	�	�%�v�v�6��
rN)
r*�
__module__�__qualname__�__doc__rrr$r/r9r@rLrPrX�rrr
r
s4����
&���*�,�<�,�,rr
c�*�eZdZdZdd�Zd�Zd�Zd�Zy)ra�A test address represents a user's request to run a particular
    test. The user may specify a filename or module (or neither),
    and/or a callable (a class, function, or method). The naming
    format for test addresses is:

    filename_or_module:callable

    Filenames that are not absolute will be made absolute relative to
    the working dir.

    The filename or module part will be considered a module name if it
    doesn't look like a file, that is, if it doesn't exist on the file
    system and it doesn't contain any directory separators and it
    doesn't end in .py.

    Callables may be a class name, function name, method name, or
    class.method specification.
    Nc���|�tj�}||_||_t	|�\|_|_|_tjd||j
|j|j�|j
�1|j�%t|j|j�|_|j
ryt|j
�|_t|j
�s$tt||j
��|_|j�t|j
�|_tjd||j
|j|j�y)Nz4Test name %s resolved to file %s, module %s, call %sz;Final resolution of test name %s: file %s module %s call %s)�os�getcwdr �
workingDirr�filenamerY�callr0r1rr�op_isabs�
op_abspath�op_joinr)rr rbs   rrzTestAddress.__init__�s��������J���	�$���0?��0E�-��
�t�{�D�I��	�	�H���
�
�t�{�{�D�I�I�	?��=�=� ��{�{�&� +�D�K�K���� I��
��=�=���
�
�.�D�M��D�M�M�*� *�7�:�37�=�=�,B�!C��
��{�{�"�(����7����	�	�I��$�-�-����d�i�i�	9rc�H�|j|j|jfSr)rcrYrd�rs r�totuplezTestAddress.totuple�s���
�
�t�{�{�D�I�I�6�6rc��|jSr)r ris r�__str__zTestAddress.__str__�s���y�y�rc�n�|j�d|j�d|j�d|j�d�S)Nz: (z, �))r rcrYrdris r�__repr__zTestAddress.__repr__�s&��%)�Y�Y��
�
�%)�[�[�$�)�)�=�	=rr)r*rZr[r\rrjrlror]rrrr�s���$9�,7��=rr)"r\�loggingr`r-�nose.configr�	nose.utilrrrrrr	�	getLoggerr*r0�__all__�path�joinrg�basenamer7�exists�	op_exists�splitextr?�isabsre�abspathrf�objectr
rrr]rr�<module>r~s�����	���]�]��g����!��
8��
�'�'�,�,���g�g�����G�G�N�N�	��g�g����
�7�7�=�=��
�W�W�_�_�
�d�v�d�L��1=�&�1=r

if you don't want to be vaporized in a nuclear explosion, i simply have to become nuclear myself… i am atomic