https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /opt/alt/python35/lib/python3.5/site-packages/setuptools/command/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python35/lib/python3.5/site-packages/setuptools/command/__pycache__/test.cpython-35.pyc


��\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@ 

https://t.me/AnonymousX5 - 2025