HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.5/unittest/__pycache__/suite.cpython-35.pyc


Füƒaï(ã@s¬dZddlZddlmZddlmZdZdd„ZGd	d
„d
eƒZGdd„deƒZ	Gdd
„d
eƒZ
dd„ZGdd„deƒZdS)Ú	TestSuiteéNé)Úcase)ÚutilTcCs#t||dd„ƒ}|ƒdS)NcSsdS)N©rrrú$/usr/lib/python3.5/unittest/suite.pyÚ<lambda>sz!_call_if_exists.<locals>.<lambda>)Úgetattr)ÚparentÚattrÚfuncrrrÚ_call_if_existssr
c@s£eZdZdZdZfdd„Zdd„Zdd„Zd	d
„Zdd„Z	d
d„Z
dd„Zdd„Zdd„Z
dd„Zdd„ZdS)Ú
BaseTestSuitezNA simple test suite that doesn't provide class or module shared fixtures.
    TcCs#g|_d|_|j|ƒdS)Nr)Ú_testsÚ_removed_testsÚaddTests)ÚselfÚtestsrrrÚ__init__s		zBaseTestSuite.__init__cCs dtj|jƒt|ƒfS)Nz
<%s tests=%s>)rÚstrclassÚ	__class__Úlist)rrrrÚ__repr__szBaseTestSuite.__repr__cCs,t||jƒstSt|ƒt|ƒkS)N)Ú
isinstancerÚNotImplementedr)rÚotherrrrÚ__eq__szBaseTestSuite.__eq__cCs
t|jƒS)N)Úiterr)rrrrÚ__iter__"szBaseTestSuite.__iter__cCs4|j}x$|D]}|r||jƒ7}qW|S)N)rÚcountTestCases)rZcasesÚtestrrrr%s
	
zBaseTestSuite.countTestCasescCsnt|ƒs'tdjt|ƒƒƒ‚t|tƒrZt|tjt	fƒrZtdƒ‚|j
j|ƒdS)Nz{} is not callablezNTestCases and TestSuites must be instantiated before passing them to addTest())ÚcallableÚ	TypeErrorÚformatÚreprrÚtypeÚ
issubclassrZTestCaserrÚappend)rr rrrÚaddTest,szBaseTestSuite.addTestcCs=t|tƒrtdƒ‚x|D]}|j|ƒq"WdS)Nz0tests must be an iterable of tests, not a string)rÚstrr"r()rrr rrrr6s
zBaseTestSuite.addTestscCsKxDt|ƒD]6\}}|jr#P||ƒ|jr
|j|ƒq
W|S)N)Ú	enumerateÚ
shouldStopÚ_cleanupÚ_removeTestAtIndex)rÚresultÚindexr rrrÚrun<s	
	zBaseTestSuite.runcCs[y|j|}Wntk
r%Yn2Xt|dƒrJ|j|jƒ7_d|j|<dS)z2Stop holding a reference to the TestCase at index.rN)rr"Úhasattrrr)rr/r rrrr-Es
z BaseTestSuite._removeTestAtIndexcOs|j||ŽS)N)r0)rÚargsÚkwdsrrrÚ__call__SszBaseTestSuite.__call__cCsx|D]}|jƒqWdS)z7Run the tests without collecting errors in a TestResultN)Údebug)rr rrrr5Vs
zBaseTestSuite.debugN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r,rrrrrr(rr0r-r4r5rrrrrs
	rc@syeZdZdZddd„Zdd„Zdd„Zd	d
„Zdd„Zd
d„Z	dd„Z
dd„ZdS)ra³A test suite is a composite test consisting of a number of TestCases.

    For use, create an instance of TestSuite, then add test case instances.
    When all tests have been added, the suite can be passed to a test
    runner, such as TextTestRunner. It will run the individual test cases
    in the order in which they were added, aggregating the results. When
    subclassing, do not forget to call the base class constructor.
    FcCs'd}t|ddƒdkr+d|_}xÉt|ƒD]»\}}|jrNPt|ƒrÀ|j||ƒ|j||ƒ|j||ƒ|j|_	t|jddƒs8t|ddƒrÀq8|sÓ||ƒn
|j
ƒ|jr8|j|ƒq8W|r#|jd|ƒ|j
|ƒd|_|S)NFÚ_testRunEnteredTÚ_classSetupFailedÚ_moduleSetUpFailed)r	r:r*r+Ú_isnotsuiteÚ_tearDownPreviousClassÚ_handleModuleFixtureÚ_handleClassSetUprÚ_previousTestClassr5r,r-Ú_handleModuleTearDown)rr.r5ZtopLevelr/r rrrr0fs0
	

	
	z
TestSuite.runcCstƒ}|j|dƒdS)z7Run the tests without collecting errors in a TestResultTN)Ú_DebugResultr0)rr5rrrr5‡s	zTestSuite.debugc	 Cs.t|ddƒ}|j}||kr+dS|jr8dSt|ddƒrNdSy
d|_Wntk
roYnXt|ddƒ}|dk	r*t|dƒz~y|ƒWnltk
r}zLt|tƒrЂd|_t	j
|ƒ}d|}|j|||ƒWYdd}~XnXWdt|dƒXdS)	NrAÚ__unittest_skip__FÚ
setUpClassÚ_setupStdoutTzsetUpClass (%s)Ú_restoreStdout)r	rr<r;r"r
Ú	ExceptionrrCrrÚ_addClassOrModuleLevelException)	rr r.Ú
previousClassÚcurrentClassrEÚeÚ	classNameÚ	errorNamerrrr@Žs2		


	
*zTestSuite._handleClassSetUpcCs1d}t|ddƒ}|dk	r-|j}|S)NrA)r	r7)rr.ÚpreviousModulerJrrrÚ_get_previous_module®s
	zTestSuite._get_previous_modulec	 Cs|j|ƒ}|jj}||kr+dS|j|ƒd|_ytj|}Wntk
rjdSYnXt|ddƒ}|dk	rt	|dƒzoy|ƒWn]t
k
r}z=t|tƒrË‚d|_d|}|j
|||ƒWYdd}~XnXWdt	|dƒXdS)NFÚsetUpModulerFTzsetUpModule (%s)rG)rPrr7rBr<ÚsysÚmodulesÚKeyErrorr	r
rHrrCrI)	rr r.rOZ
currentModuleÚmodulerQrLrNrrrr?¶s,
	
	
	
*zTestSuite._handleModuleFixturecCslt|ƒ}t|ddƒ}|dk	rRt|tjƒrR||t|ƒƒn|j|tjƒƒdS)NÚaddSkip)	Ú_ErrorHolderr	rrZSkipTestr)ZaddErrorrRÚexc_info)rr.Z	exceptionrNÚerrorrVrrrrIÒs
z)TestSuite._addClassOrModuleLevelExceptionc Csü|j|ƒ}|dkrdS|jr,dSytj|}Wntk
rUdSYnXt|ddƒ}|dk	røt|dƒzfy|ƒWnTtk
rå}z4t|t	ƒr¶‚d|}|j
|||ƒWYdd}~XnXWdt|dƒXdS)NÚtearDownModulerFztearDownModule (%s)rG)rPr<rRrSrTr	r
rHrrCrI)rr.rOrUrZrLrNrrrrBÚs(	
	

*zTestSuite._handleModuleTearDownc	Cs"t|ddƒ}|j}||kr+dSt|ddƒrAdSt|ddƒrWdSt|ddƒrmdSt|ddƒ}|dk	rt|dƒzuy|ƒWnctk
r}zCt|tƒrÍ‚tj|ƒ}d|}|j|||ƒWYdd}~XnXWdt|d	ƒXdS)
NrAr;Fr<rDÚ
tearDownClassrFztearDownClass (%s)rG)	r	rr
rHrrCrrrI)	rr r.rJrKr[rLrMrNrrrr>ós,	

*z TestSuite._tearDownPreviousClassN)r6r7r8r9r0r5r@rPr?rIrBr>rrrrr\s! c@s|eZdZdZdZdd„Zdd„Zdd„Zd	d
„Zdd„Z	d
d„Z
dd„Zdd„ZdS)rWz¾
    Placeholder for a TestCase inside a result. As far as a TestResult
    is concerned, this looks exactly like a unit test. Used to insert
    arbitrary errors into a test suite run.
    NcCs
||_dS)N)Údescription)rr\rrrrsz_ErrorHolder.__init__cCs|jS)N)r\)rrrrÚidsz_ErrorHolder.idcCsdS)Nr)rrrrÚshortDescription sz_ErrorHolder.shortDescriptioncCsd|jfS)Nz<ErrorHolder description=%r>)r\)rrrrr#sz_ErrorHolder.__repr__cCs
|jƒS)N)r])rrrrÚ__str__&sz_ErrorHolder.__str__cCsdS)Nr)rr.rrrr0)sz_ErrorHolder.runcCs
|j|ƒS)N)r0)rr.rrrr4.sz_ErrorHolder.__call__cCsdS)Nrr)rrrrr1sz_ErrorHolder.countTestCases)
r6r7r8r9ZfailureExceptionrr]r^rr_r0r4rrrrrrWsrWcCs+yt|ƒWntk
r&dSYnXdS)z?A crude way to tell apart testcases and suites with duck-typingTF)rr")r rrrr=4s

	r=c@s(eZdZdZdZdZdZdS)rCzCUsed by the TestSuite to hold previous class when running in debug.NF)r6r7r8r9rAr<r+rrrrrC=srC)
r9rRÚrrZ
__unittestr
ÚobjectrrrWr=rCrrrrÚ<module>sL²&