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 :  /lib64/python2.7/site-packages/django/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/django/test/runner.pyc
�
r�\c@s�ddlZddlmZddlmZddlmZddlmZddl	m
Z
mZddlm
Z
ddlmZmZd	efd
��YZd�Zd�Zd
�Zd�ZdS(i����N(tmake_option(tsettings(tImproperlyConfigured(tTestCase(tsetup_test_environmenttteardown_test_environment(tunittest(t	TestSuitetdefaultTestLoadertDiscoverRunnercBs�eZdZeZefZedddddddddd	�ed
ddddddd
dd�fZ	ddde
ed�Zd�Z
ddd�Zd�Zd�Zd�Zd�Zd�Zdd�ZRS(sB
    A Django test runner that uses unittest2 test discovery.
    s-ts--top-level-directorytactiontstoretdestt	top_leveltdefaultthelps,Top level of project for unittest discovery.s-ps	--patterntpatternstest*.pys0The test matching pattern. Defaults to test*.py.icKs1||_||_||_||_||_dS(N(RR
t	verbositytinteractivetfailfast(tselfRR
RRRtkwargs((s4/tmp/pip-install-XxeQeY/django/django/test/runner.pyt__init__s
				cKst�tt_tj�dS(N(RtFalseRtDEBUGRtinstallHandler(RR((s4/tmp/pip-install-XxeQeY/django/django/test/runner.pyR's	c
	Ks�t�}|pdg}|p!g}i}|jdk	rI|j|d<n|jdk	rh|j|d<nx1|D])}|j�}d}tjj|�}tjj|�s�|j	j
|�}n�tjj|�rR|jrR|}	x`trDtjj
|	d�}
tjj|
�r@tjj|	�}||	kr4Pn|}	q�nPq�W|	|d<n|oa|j�s�|j	jd||�}d|j	_n|j|�qoWx|D]}|j|�q�Wt||j�S(Nt.Rt
top_level_dirs__init__.pyt	start_dir(RRtNoneR
tcopytostpathtabspathtexiststtest_loadertloadTestsFromNametisdirtTruetjointdirnametcountTestCasestdiscovert_top_level_dirtaddTeststaddTestt
reorder_suitet
reorder_by(
Rttest_labelstextra_testsRtsuitetdiscover_kwargstlabelttestst
label_as_pathR
tinit_pyttry_nextttest((s4/tmp/pip-install-XxeQeY/django/django/test/runner.pytbuild_suite,sB	

	

cKst|j|j|�S(N(tsetup_databasesRR(RR((s4/tmp/pip-install-XxeQeY/django/django/test/runner.pyR;jscKs%tjd|jd|j�j|�S(NRR(RtTextTestRunnerRRtrun(RR2R((s4/tmp/pip-install-XxeQeY/django/django/test/runner.pyt	run_suitems		cKsI|\}}x6|D].\}}}|r|jj||j�qqWdS(s8
        Destroys all the non-mirror databases.
        N(tcreationtdestroy_test_dbR(Rt
old_configRt	old_namestmirrorst
connectiontold_nametdestroy((s4/tmp/pip-install-XxeQeY/django/django/test/runner.pytteardown_databasessscKstj�t�dS(N(Rt
removeHandlerR(RR((s4/tmp/pip-install-XxeQeY/django/django/test/runner.pyR|s
cKst|j�t|j�S(N(tlentfailuresterrors(RR2tresultR((s4/tmp/pip-install-XxeQeY/django/django/test/runner.pytsuite_result�scKs^|j�|j||�}|j�}|j|�}|j|�|j�|j||�S(s[
        Run the unit tests for all the test labels in the provided list.

        Test labels should be dotted Python paths to test modules, test
        classes, or test methods.

        A list of 'extra' tests may also be provided; these tests
        will be added to the test suite.

        Returns the number of tests that failed.
        (RR:R;R>RGRRM(RR0R1RR2RARL((s4/tmp/pip-install-XxeQeY/django/django/test/runner.pyt	run_tests�s


N(t__name__t
__module__t__doc__RR#RR/RRtoption_listR&RRRR:R;R>RGRRMRN(((s4/tmp/pip-install-XxeQeY/django/django/test/runner.pyR	s&	
	>						cCsAg}t�}i}xy|D]q\}\}}t�}x'|D]}	|j|j|	g��q>W|j|�s�td|��n|||<qWx�|r<t}
g}xu|D]m\}\}
}||j|�r|j|�|j||
|ff�t}
q�|j||
|ff�q�W|
s3td��n|}q�W|S(so
    Reorder test_databases into an order that honors the dependencies
    described in TEST_DEPENDENCIES.
    sHCircular dependency: databases %r depend on each other, but are aliases.s(Circular dependency in TEST_DEPENDENCIES(	tsettupdatetgett
isdisjointRRtissubsettappendR&(ttest_databasestdependenciestordered_test_databasestresolved_databasestdependencies_maptsigt_taliasestall_depstaliastchangedtdeferredt	signaturetdb_name((s4/tmp/pip-install-XxeQeY/django/django/test/runner.pytdependency_ordered�s4		

	
	
cCs}t|�}gt|d�D]}tj�^q}t|||�x-t|�D]}|dj||d�qRW|dS(s�
    Reorders a test suite by test type.

    `classes` is a sequence of types

    All tests of type classes[0] are placed first, then tests of type
    classes[1], etc. Tests with no match in classes are placed last.
    ii(RItrangeRRtpartition_suiteR,(R2tclassestclass_counttitbins((s4/tmp/pip-install-XxeQeY/django/django/test/runner.pyR.�s	)cCs�x�|D]�}t|tj�r2t|||�qxStt|��D].}t|||�rE||j|�PqEqEW|dj|�qWdS(s
    Partitions a test suite by test type.

    classes is a sequence of types
    bins is a sequence of TestSuites, one more than classes

    Tests of type classes[i] are added to bins[i],
    tests with no match found in classes are place in bins[-1]
    i����N(t
isinstanceRRRiRhRIR-(R2RjRmR9Rl((s4/tmp/pip-install-XxeQeY/django/django/test/runner.pyRi�s

cKs'ddlm}m}i}i}i}||jj�}x�|D]�}	||	}
|
jdrs|
jd||	<qB|j|
jj�|
jdt�f�}|dj|	�d|
jkr�|
jd||	<qB|	|krB|
jj�|krB|
jj	d|g�||	<qBqBWg}g}
x�t
|j�|�D]�\}\}}d}xo|D]g}	||	}
|dkr�|
jj
|d|�}t}n||
jd<t}|j|
||f�qWWq8WxT|j�D]F\}	}|
j|	||	jdf�||jd||	jd<q�W||
fS(Ni����(tconnectionstDEFAULT_DB_ALIAStTEST_MIRRORtNAMEitTEST_DEPENDENCIEStautoclobber(t	django.dbRoRpR?ttest_db_signaturet
settings_dictt
setdefaultRStaddRURgtitemsRtcreate_test_dbR&RRX(RRRRoRptmirrored_aliasesRYRZtdefault_sigRbRDtitemRBRCReRfR`ttest_db_nameRFtmirror_alias((s4/tmp/pip-install-XxeQeY/django/django/test/runner.pyR;�sH


!	"

		
 (RtoptparseRtdjango.confRtdjango.core.exceptionsRtdjango.testRtdjango.test.utilsRRtdjango.utilsRtdjango.utils.unittestRRtobjectR	RgR.RiR;(((s4/tmp/pip-install-XxeQeY/django/django/test/runner.pyt<module>s�	*		

https://t.me/AnonymousX5 - 2025