HEX
Server: LiteSpeed
System: Linux ws4.angoweb.net 5.14.0-611.13.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 11 04:57:59 EST 2025 x86_64
User: tswangoe (2287)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/nose/plugins/__pycache__/collect.cpython-37.pyc
B

�=^���@sjdZddlmZddlmZddlZddlZe�e�Z	Gdd�de�Z
Gdd�d�ZGd	d
�d
ej�ZdS)a

This plugin bypasses the actual execution of tests, and instead just collects
test names. Fixtures are also bypassed, so running nosetests with the 
collection plugin enabled should be very quick.

This plugin is useful in combination with the testid plugin (``--with-id``).
Run both together to get an indexed list of all tests, which will enable you to
run individual tests by index number.

This plugin is also useful for counting tests in a test suite, and making
people watching your demo think all of your tests pass.
�)�Plugin)�TestNc@s0eZdZdZdZdZdd�Zdd�Zdd	�Zd
S)�CollectOnlyzB
    Collect and output test names only, don't run any tests.
    zcollect-onlyZcollect_onlycCs(|jdd|j|�d�d|��d�dS)z&Register commandline options.
        z--collect-only�
store_trueZNOSE_COLLECT_ONLYz&Enable collect-only: %s [COLLECT_ONLY])�action�dest�default�helpN)�
add_option�	enableOpt�getr	)�self�parser�env�r�E/opt/alt/python37/lib/python3.7/site-packages/nose/plugins/collect.py�optionsszCollectOnly.optionscCst�d�t|j�|_dS)z8Install collect-only suite class in TestLoader.
        zPreparing test loaderN)�log�debug�TestSuiteFactory�conf�
suiteClass)r
�loaderrrr�prepareTestLoader&s
zCollectOnly.prepareTestLoadercs,t�d��t�t�sdS��fdd�}|S)z;Replace actual test with dummy that always passes.
        zPreparing test case %sNcsL�jj���|����jj���|����jj���|���dS)N)rZplugins�	startTest�
addSuccess�stopTest)�result)r
�testrr�run4s

z(CollectOnly.prepareTestCase.<locals>.run)rr�
isinstancer)r
rrr)r
rr�prepareTestCase-s

	zCollectOnly.prepareTestCaseN)	�__name__�
__module__�__qualname__�__doc__�namerrrr!rrrrrs
rc@s"eZdZdZdd�Zddd�ZdS)	rz7
    Factory for producing configured test suites.
    cCs
||_dS)N)r)r
rrrr�__init__DszTestSuiteFactory.__init__rcKst||jd�S)N)r)�	TestSuiter)r
�tests�kwrrr�__call__GszTestSuiteFactory.__call__N)r)r"r#r$r%r'r+rrrrr@src@s"eZdZdZddd�Zdd�ZdS)	r(z�
    Basic test suite that bypasses most proxy and plugin calls, but does
    wrap tests in a nose.case.Test so prepareTestCase will be called.
    rNcCs2||_t|�r|�}t�d|�tj�||�dS)Nz
TestSuite(%r))r�callablerr�unittestr(r')r
r)rrrrr'Ps
zTestSuite.__init__cCs@t�d|�t|tj�r&|j�|�n|j�t||jd��dS)NzAdd test %s)�config)	rrr r-r(�_tests�appendrr)r
rrrr�addTestXszTestSuite.addTest)rN)r"r#r$r%r'r1rrrrr(Ks
r()
r%Znose.plugins.baserZ	nose.caser�loggingr-�	getLoggerr"rrrr(rrrr�<module>s
+