[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.145.43.92: ~ $


��\T#�@s>ddlZddlZddlZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
ddlmZmZddlmZmZmZmZmZmZmZmZmZddlmZdd	lmZGd
d�de�ZGdd
�d
e �Z!Gdd�de�Z"dS)�N)�DistutilsError�DistutilsOptionError)�log)�
TestLoader)�six)�map�filter)	�resource_listdir�resource_exists�normalize_path�working_set�_namespace_packages�evaluate_marker�add_activation_listener�require�
EntryPoint)�Command)�
unittest_mainc@seZdZddd�ZdS)�ScanningLoaderNcCsg}|jtj||��t|d�rA|j|j��t|d�r�x�t|jd�D]�}|jd�r�|dkr�|jd|dd�}n-t|j|d	�rc|jd|}nqc|j|j	|��qcWt
|�d
kr|j|�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.
        �additional_tests�__path__�z.pyz__init__.py�.N�z/__init__.py�r���)�appendr�loadTestsFromModule�hasattrrr	�__name__�endswithr
ZloadTestsFromName�lenZ
suiteClass)�self�module�patternZtests�fileZ	submodule�r&�/test.pyrs
z"ScanningLoader.loadTestsFromModule)r�
__module__�__qualname__rr&r&r&r'rsrc@s+eZdZdd�Zddd�ZdS)�NonDataPropertycCs
||_dS)N)�fget)r"r+r&r&r'�__init__5szNonDataProperty.__init__NcCs|dkr|S|j|�S)N)r+)r"�objZobjtyper&r&r'�__get__8szNonDataProperty.__get__)rr(r)r,r.r&r&r&r'r*4sr*c@s�eZdZdZdZd%d&d'gZdd
�Zdd�Zedd��Z	dd�Z
dd�Zej
gdd��Zeej
dd���Zedd��Zdd�Zdd�Zed d!��Zed"d#��Zd$S)(�testz.Command to run unit tests after in-place buildz#run unit tests after in-place build�test-module=�m�$Run 'test_suite' in specified module�test-suite=�s�9Run single test, case or suite (e.g. 'module.test_suite')�test-runner=�r�Test runner to usecCs(d|_d|_d|_d|_dS)N)�
test_suite�test_module�test_loader�test_runner)r"r&r&r'�initialize_optionsJs			ztest.initialize_optionscCs�|jr$|jr$d}t|��|jdkrd|jdkrT|jj|_n|jd|_|jdkr�t|jdd�|_|jdkr�d|_|jdkr�t|jdd�|_dS)Nz1You may specify a module or a suite, but not bothz.test_suiter;z&setuptools.command.test:ScanningLoaderr<)r9r:r�distributionr;�getattrr<)r"�msgr&r&r'�finalize_optionsPs	ztest.finalize_optionscCst|j��S)N)�list�
_test_args)r"r&r&r'�	test_argscsztest.test_argsccs#|jrdV|jr|jVdS)Nz	--verbose)�verboser9)r"r&r&r'rCgs		ztest._test_argsc	Cs|j��|�WdQRXdS)zI
        Backward compatibility for project_on_sys_path context.
        N)�project_on_sys_path)r"�funcr&r&r'�with_project_on_sys_pathms
ztest.with_project_on_sys_pathc	cs�tjot|jdd�}|r�|jddd�|jd�|jd�}t|j�}|jdd|�|jd�|jddd�|jd�n-|jd�|jddd	�|jd�|jd�}t	j
dd�}t	jj�}zyt|j
�}t	j
jd|�tj�td
d��td|j|jf�|j|g��
dVWdQRXWd|t	j
dd�<t	jj�t	jj|�tj�XdS)
N�use_2to3FZbuild_pyZinplacerZegg_info�egg_baseZ	build_extrcSs
|j�S)N)Zactivate)�distr&r&r'�<lambda>�sz*test.project_on_sys_path.<locals>.<lambda>z%s==%s)r�PY3r?r>Zreinitialize_commandZrun_commandZget_finalized_commandrZ	build_lib�sys�path�modules�copyrJ�insertrr,rrZegg_nameZegg_version�paths_on_pythonpath�clear�update)	r"Z
include_distsZ	with_2to3Zbpy_cmdZ
build_pathZei_cmdZold_pathZold_modulesZproject_pathr&r&r'rFts8





ztest.project_on_sys_pathccs�t�}tjjd|�}tjjdd�}zUtjj|�}td||g�}tjj|�}|r�|tjd<dVWd||kr�tjjdd�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�pathsep�joinr�pop)�pathsZnothingZorig_pythonpathZcurrent_pythonpath�prefixZto_join�new_pathr&r&r'rS�s
	
	ztest.paths_on_pythonpathcCsb|j|j�}|j|jp$g�}|jdd�|jj�D��}tj|||�S)z�
        Install the requirements indicated by self.distribution and
        return an iterable of the dists that were built.
        css@|]6\}}|jd�rt|dd��r|VqdS)�:rN)�
startswithr)�.0�k�vr&r&r'�	<genexpr>�s	z%test.install_dists.<locals>.<genexpr>)Zfetch_build_eggsZinstall_requiresZ
tests_requireZextras_require�items�	itertools�chain)rKZir_dZtr_dZer_dr&r&r'�
install_dists�s
ztest.install_distscCs�|j|j�}dj|j�}|jrB|jd|�dS|jd|�ttjd�|�}|j	|��#|j
��|j�WdQRXWdQRXdS)N� zskipping "%s" (dry run)zrunning "%s"�location)rjr>r\�_argv�dry_run�announcer�operator�
attrgetterrSrF�	run_tests)r"Zinstalled_dists�cmdr^r&r&r'�run�s	
ztest.runc	CsQtjr�t|jdd�r�|jjd�d}|tkr�g}|tjkrb|j	|�|d7}x-tjD]"}|j
|�rv|j	|�qvWtttjj
|��tjdkr�in	ddi}tdd|jd|j|j�d	|j|j�|�}|jj�sMd
|j}|j|tj�t|��dS)NrIFrr���exitZ
testLoaderZ
testRunnerzTest failed: %s)rurv)rrMr?r>r9�splitr
rNrPrrbrBr�__delitem__�version_inforrm�_resolve_as_epr;r<�resultZ
wasSuccessfulror�ERRORr)r"r#Zdel_modules�nameZ
exit_kwargr/r@r&r&r'rr�s*

!	
ztest.run_testscCsdg|jS)N�unittest)rD)r"r&r&r'rm�sz
test._argvcCs0|dkrdStjd|�}|j��S)zu
        Load the indicated attribute value, called, as a as if it were
        specified as an entry point.
        Nzx=)r�parseZresolve)�valZparsedr&r&r'r{�sztest._resolve_as_epN)r0r1r2)r3r4r5)r6r7r8)rr(r)�__doc__�descriptionZuser_optionsr=rAr*rDrCrH�
contextlib�contextmanagerrF�staticmethodrSrjrtrr�propertyrmr{r&r&r&r'r/>s(	-r/)#rXrprNr�rhZdistutils.errorsrrZ	distutilsrrrZsetuptools.externrZsetuptools.extern.six.movesrrZ
pkg_resourcesr	r
rrr
rrrrZ
setuptoolsrZsetuptools.py31compatrrrWr*r/r&r&r&r'�<module>s@ 

Filemanager

Name Type Size Permission Actions
__init__.cpython-35.opt-1.pyc File 681 B 0644
__init__.cpython-35.pyc File 681 B 0644
alias.cpython-35.opt-1.pyc File 2.49 KB 0644
alias.cpython-35.pyc File 2.49 KB 0644
bdist_egg.cpython-35.opt-1.pyc File 14.54 KB 0644
bdist_egg.cpython-35.pyc File 14.54 KB 0644
bdist_rpm.cpython-35.opt-1.pyc File 1.74 KB 0644
bdist_rpm.cpython-35.pyc File 1.74 KB 0644
bdist_wininst.cpython-35.opt-1.pyc File 926 B 0644
bdist_wininst.cpython-35.pyc File 926 B 0644
build_clib.cpython-35.opt-1.pyc File 2.47 KB 0644
build_clib.cpython-35.pyc File 2.47 KB 0644
build_ext.cpython-35.opt-1.pyc File 10.59 KB 0644
build_ext.cpython-35.pyc File 10.62 KB 0644
build_py.cpython-35.opt-1.pyc File 8.99 KB 0644
build_py.cpython-35.pyc File 8.99 KB 0644
develop.cpython-35.opt-1.pyc File 6.74 KB 0644
develop.cpython-35.pyc File 6.74 KB 0644
easy_install.cpython-35.opt-1.pyc File 68.1 KB 0644
easy_install.cpython-35.pyc File 68.1 KB 0644
egg_info.cpython-35.opt-1.pyc File 22.17 KB 0644
egg_info.cpython-35.pyc File 22.17 KB 0644
install.cpython-35.opt-1.pyc File 4.08 KB 0644
install.cpython-35.pyc File 4.08 KB 0644
install_egg_info.cpython-35.opt-1.pyc File 2.48 KB 0644
install_egg_info.cpython-35.pyc File 2.48 KB 0644
install_lib.cpython-35.opt-1.pyc File 4.08 KB 0644
install_lib.cpython-35.pyc File 4.12 KB 0644
install_scripts.cpython-35.opt-1.pyc File 2.33 KB 0644
install_scripts.cpython-35.pyc File 2.33 KB 0644
py36compat.cpython-35.opt-1.pyc File 4.75 KB 0644
py36compat.cpython-35.pyc File 4.75 KB 0644
register.cpython-35.opt-1.pyc File 531 B 0644
register.cpython-35.pyc File 531 B 0644
rotate.cpython-35.opt-1.pyc File 2.63 KB 0644
rotate.cpython-35.pyc File 2.63 KB 0644
saveopts.cpython-35.opt-1.pyc File 896 B 0644
saveopts.cpython-35.pyc File 896 B 0644
sdist.cpython-35.opt-1.pyc File 6.43 KB 0644
sdist.cpython-35.pyc File 6.43 KB 0644
setopt.cpython-35.opt-1.pyc File 4.76 KB 0644
setopt.cpython-35.pyc File 4.76 KB 0644
test.cpython-35.opt-1.pyc File 8.4 KB 0644
test.cpython-35.pyc File 8.4 KB 0644
upload.cpython-35.opt-1.pyc File 1.34 KB 0644
upload.cpython-35.pyc File 1.34 KB 0644
upload_docs.cpython-35.opt-1.pyc File 6.44 KB 0644
upload_docs.cpython-35.pyc File 6.46 KB 0644