[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.134.80.24: ~ $
U

+�a%�@s�ddlZddlZddlZddlZddlZddlZddlmZmZddl	m
Z
ddlmZddlm
Z
mZmZmZmZmZmZmZmZddlmZddlmZGdd	�d	e�ZGd
d�d�ZGdd
�d
e�ZdS)�N)�DistutilsError�DistutilsOptionError)�log)�
TestLoader)	�resource_listdir�resource_exists�normalize_path�working_set�_namespace_packages�evaluate_marker�add_activation_listener�require�
EntryPoint)�Command)�unique_everseenc@seZdZdd�Zddd�ZdS)�ScanningLoadercCst�|�t�|_dS�N)r�__init__�set�_visited��self�r�?/tmp/pip-install-1bd_1mtk/setuptools/setuptools/command/test.pyrs
zScanningLoader.__init__NcCs�||jkrdS|j�|�g}|�t�||��t|d�rH|�|���t|d�r�t|jd�D]`}|�	d�r�|dkr�|jd|dd�}n"t
|j|d	�r^|jd|}nq^|�|�|��q^t|�d
kr�|�
|�S|dSdS)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__�endswithrZloadTestsFromName�lenZ
suiteClass)r�module�pattern�tests�file�	submodulerrrr"s$



z"ScanningLoader.loadTestsFromModule)N)r$�
__module__�__qualname__rr"rrrrrsrc@seZdZdd�Zddd�ZdS)�NonDataPropertycCs
||_dSr��fget)rr0rrrr<szNonDataProperty.__init__NcCs|dkr|S|�|�Srr/)r�objZobjtyperrr�__get__?szNonDataProperty.__get__)N)r$r,r-rr2rrrrr.;sr.c@s�eZdZdZdZdddgZdd�Zdd	�Zed
d��Z	dd
�Z
dd�Zej
gfdd��Zeej
dd���Zedd��Zdd�Zdd�Zedd��Zedd��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 usecCsd|_d|_d|_d|_dSr)�
test_suite�test_module�test_loader�test_runnerrrrr�initialize_optionsQsztest.initialize_optionscCs�|jr|jrd}t|��|jdkrD|jdkr8|jj|_n|jd|_|jdkr^t|jdd�|_|jdkrnd|_|jdkr�t|jdd�|_dS)Nz1You may specify a module or a suite, but not bothz.test_suiter9z&setuptools.command.test:ScanningLoaderr:)r7r8r�distributionr9�getattrr:)r�msgrrr�finalize_optionsWs




ztest.finalize_optionscCst|���Sr)�list�
_test_argsrrrr�	test_argsjsztest.test_argsccs4|jstjdkrdV|jr"dV|jr0|jVdS)N)��Zdiscoverz	--verbose)r7�sys�version_info�verboserrrrrAnsztest._test_argsc	Cs|���|�W5QRXdS)zI
        Backward compatibility for project_on_sys_path context.
        N)�project_on_sys_path)r�funcrrr�with_project_on_sys_pathvs
ztest.with_project_on_sys_pathc	
csJt|jdd�}|rp|jddd�|�d�|�d�}t|j�}|jd|d�|�d�|jddd�|�d�n"|�d�|jdd	d�|�d�|�d�}tjdd�}tj	�
�}zbt|j�}tj�d|�t
��td
d��td|j|jf�|�|g��dVW5QRXW5|tjdd�<tj	��tj	�|�t
��XdS)
N�use_2to3F�build_pyr)Zinplace�egg_info)�egg_base�	build_extrcSs|��Sr)�activate)�distrrr�<lambda>��z*test.project_on_sys_path.<locals>.<lambda>z%s==%s)r=r<�reinitialize_command�run_command�get_finalized_commandr�	build_librE�path�modules�copy�clear�updater	rrN�insertrr
�egg_nameZegg_version�paths_on_pythonpath)	rZ
include_distsZ	with_2to3Zbpy_cmdZ
build_pathZei_cmd�old_pathZold_modulesZproject_pathrrrrH}s8









ztest.project_on_sys_pathc
cs�t�}tj�d|�}tj�dd�}zBtj�t|��}td||g�}tj�|�}|r\|tjd<dVW5||kr~tj�dd�n
|tjd<XdS)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.
        �
PYTHONPATHrN)	�object�os�environ�get�pop�pathsep�joinr�filter)�pathsZnothingZorig_pythonpathZcurrent_pythonpath�prefixZto_join�new_pathrrrr_�s


ztest.paths_on_pythonpathcCsD|�|j�}|�|jpg�}|�dd�|j��D��}t�|||�S)z�
        Install the requirements indicated by self.distribution and
        return an iterable of the dists that were built.
        css0|](\}}|�d�rt|dd��r|VqdS)�:rN)�
startswithr)�.0�k�vrrr�	<genexpr>�s
�z%test.install_dists.<locals>.<genexpr>)Zfetch_build_eggsZinstall_requiresZ
tests_requireZextras_require�items�	itertools�chain)rQZir_dZtr_dZer_drrr�
install_dists�s
�ztest.install_distsc
Cs�|�dtj�|�|j�}d�|j�}|jr>|�d|�dS|�d|�tt	�
d�|�}|�|��"|���|�
�W5QRXW5QRXdS)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�WARNrvr<rh�_argv�dry_run�map�operator�
attrgetterr_rH�	run_tests)rZinstalled_dists�cmdrjrrr�run�s�
ztest.runcCs�t|jdd�rx|j�d�d}|tkrxg}|tjkr>|�|�|d7}tjD]}|�|�rL|�|�qLt	t
tjj|��tj
dd|j|�|j�|�|j�dd�}|j��s�d|j}|�|tj�t|��dS)NrKFrr)Z
testLoaderZ
testRunner�exitzTest failed: %s)r=r<r7�splitr
rErYr!rnr@r}�__delitem__�unittest�mainr{�_resolve_as_epr9r:�resultZ
wasSuccessfulryr�ERRORr)rr'Zdel_modules�namer3r>rrrr��s.





�

ztest.run_testscCsdg|jS)Nr�)rBrrrrr{sz
test._argvcCs$|dkrdSt�d|�}|���S)zu
        Load the indicated attribute value, called, as a as if it were
        specified as an entry point.
        Nzx=)r�parse�resolve)�val�parsedrrrr�	sztest._resolve_as_epN)r$r,r-�__doc__�description�user_optionsr;r?r.rBrArJ�
contextlib�contextmanagerrH�staticmethodr_rvr�r��propertyr{r�rrrrr3Es2�
-


r3)rcr~rEr�rtr��distutils.errorsrr�	distutilsrr�
pkg_resourcesrrrr	r
rrr
r�
setuptoolsrZ setuptools.extern.more_itertoolsrrr.r3rrrr�<module>s,)

Filemanager

Name Type Size Permission Actions
__init__.cpython-38.pyc File 347 B 0644
alias.cpython-38.pyc File 2.29 KB 0644
bdist_egg.cpython-38.pyc File 12.7 KB 0644
bdist_rpm.cpython-38.pyc File 1.3 KB 0644
build_clib.cpython-38.pyc File 2.38 KB 0644
build_ext.cpython-38.pyc File 9.63 KB 0644
build_py.cpython-38.pyc File 8.14 KB 0644
develop.cpython-38.pyc File 6.24 KB 0644
dist_info.cpython-38.pyc File 1.33 KB 0644
easy_install.cpython-38.pyc File 61.74 KB 0644
egg_info.cpython-38.pyc File 21.42 KB 0644
install.cpython-38.pyc File 3.93 KB 0644
install_egg_info.cpython-38.pyc File 2.35 KB 0644
install_lib.cpython-38.pyc File 4.04 KB 0644
install_scripts.cpython-38.pyc File 2.34 KB 0644
py36compat.cpython-38.pyc File 4.45 KB 0644
register.cpython-38.pyc File 815 B 0644
rotate.cpython-38.pyc File 2.43 KB 0644
saveopts.cpython-38.pyc File 893 B 0644
sdist.cpython-38.pyc File 6.24 KB 0644
setopt.cpython-38.pyc File 4.4 KB 0644
test.cpython-38.pyc File 8.13 KB 0644
upload.cpython-38.pyc File 788 B 0644
upload_docs.cpython-38.pyc File 5.95 KB 0644