AlkantarClanX12

Your IP : 3.135.209.107


Current Path : /opt/alt/python33/lib64/python3.3/unittest/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/unittest/__pycache__/suite.cpython-33.pyc

�
��f�%c@s�dZddlZddlmZddlmZdZdd�ZGdd	�d	e�Z	Gd
d�de	�Z
Gdd�de�Zd
d�ZGdd�de�Z
dS(u	TestSuiteiNi(ucase(uutilcCs#t||dd��}|�dS(NcSsdS(N(uNone(((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu<lambda>su!_call_if_exists.<locals>.<lambda>(ugetattr(uparentuattrufunc((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu_call_if_existssu_call_if_existscBs�|EeZdZdZfdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS(u
BaseTestSuiteuNA simple test suite that doesn't provide class or module shared fixtures.
    cCsg|_|j|�dS(N(u_testsuaddTests(uselfutests((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu__init__s	uBaseTestSuite.__init__cCs dtj|j�t|�fS(Nu
<%s tests=%s>(uutilustrclassu	__class__ulist(uself((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu__repr__suBaseTestSuite.__repr__cCs,t||j�stSt|�t|�kS(N(u
isinstanceu	__class__uNotImplementedulist(uselfuother((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu__eq__suBaseTestSuite.__eq__cCs||kS(N((uselfuother((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu__ne__suBaseTestSuite.__ne__cCs
t|j�S(N(uiteru_tests(uself((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu__iter__"suBaseTestSuite.__iter__cCs+d}x|D]}||j�7}q
W|S(Ni(ucountTestCases(uselfucasesutest((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyucountTestCases%s
uBaseTestSuite.countTestCasescCstt|�s*tdjt|����nt|t�r`t|tjt	f�r`td��n|j
j|�dS(Nu{} is not callableuNTestCases and TestSuites must be instantiated before passing them to addTest()(ucallableu	TypeErroruformaturepru
isinstanceutypeu
issubclassucaseuTestCaseu	TestSuiteu_testsuappend(uselfutest((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyuaddTest+suBaseTestSuite.addTestcCs@t|t�rtd��nx|D]}|j|�q%WdS(Nu0tests must be an iterable of tests, not a string(u
isinstanceustru	TypeErroruaddTest(uselfutestsutest((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyuaddTests5s
uBaseTestSuite.addTestscCs,x%|D]}|jrPn||�qW|S(N(u
shouldStop(uselfuresultutest((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyurun;s

	uBaseTestSuite.runcOs|j||�S(N(urun(uselfuargsukwds((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu__call__BsuBaseTestSuite.__call__cCsx|D]}|j�qWdS(u7Run the tests without collecting errors in a TestResultN(udebug(uselfutest((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyudebugEs
uBaseTestSuite.debugN(u__name__u
__module__u__qualname__u__doc__u__init__u__repr__u__eq__u__ne__u__iter__ucountTestCasesuaddTestuaddTestsurunu__call__udebug(u
__locals__((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu
BaseTestSuites
u
BaseTestSuitecBs}|EeZdZdZddd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�ZdS(u	TestSuiteu�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.
    cCsd}t|dd�dkr.d|_}nx�|D]�}|jrHPnt|�r�|j||�|j||�|j||�|j	|_
t|j	dd�s5t|dd�r�q5q�n|s�||�q5|j�q5W|r|jd|�|j
|�d|_n|S(Nu_testRunEnteredu_classSetupFailedu_moduleSetUpFailedFT(uFalseugetattruTrueu_testRunEnteredu
shouldStopu_isnotsuiteu_tearDownPreviousClassu_handleModuleFixtureu_handleClassSetUpu	__class__u_previousTestClassudebuguNoneu_handleModuleTearDown(uselfuresultudebugutopLevelutest((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyurunUs,
		

u
TestSuite.runcCst�}|j|d�dS(u7Run the tests without collecting errors in a TestResultNT(u_DebugResulturunuTrue(uselfudebug((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyudebugss	uTestSuite.debugc	 Cs4t|dd�}|j}||kr+dS|jr8dSt|dd�rNdSy
d|_Wntk
roYnXt|dd�}|dk	r0t|d�z�y|�Wnotk
r}zOt	|t
�r��nd|_tj
|�}d|}|j|||�WYdd}~XnXWdt|d�XndS(	Nu_previousTestClassu__unittest_skip__u
setUpClassu_setupStdoutusetUpClass (%s)u_restoreStdoutFT(ugetattruNoneu	__class__u_moduleSetUpFaileduFalseu_classSetupFailedu	TypeErroru_call_if_existsu	Exceptionu
isinstanceu_DebugResultuTrueuutilustrclassu_addClassOrModuleLevelException(	uselfutesturesultu
previousClassucurrentClassu
setUpClassueu	classNameu	errorName((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu_handleClassSetUpzs2		


	
*uTestSuite._handleClassSetUpcCs4d}t|dd�}|dk	r0|j}n|S(Nu_previousTestClass(uNoneugetattru
__module__(uselfuresultupreviousModuleu
previousClass((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu_get_previous_module�s
uTestSuite._get_previous_modulec	 Cs |j|�}|jj}||kr+dS|j|�d|_ytj|}Wntk
rjdSYnXt	|dd�}|dk	rt|d�zry|�Wn`tk
r}z@t
|t�r��nd|_d|}|j|||�WYdd}~XnXWdt|d�XndS(NusetUpModuleu_setupStdoutusetUpModule (%s)u_restoreStdoutFT(u_get_previous_moduleu	__class__u
__module__u_handleModuleTearDownuFalseu_moduleSetUpFailedusysumodulesuKeyErrorugetattruNoneu_call_if_existsu	Exceptionu
isinstanceu_DebugResultuTrueu_addClassOrModuleLevelException(	uselfutesturesultupreviousModuleu
currentModuleumoduleusetUpModuleueu	errorName((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu_handleModuleFixture�s,
	
	
	
*uTestSuite._handleModuleFixturecCslt|�}t|dd�}|dk	rRt|tj�rR||t|��n|j|tj	��dS(NuaddSkip(
u_ErrorHolderugetattruNoneu
isinstanceucaseuSkipTestustruaddErrorusysuexc_info(uselfuresultu	exceptionu	errorNameuerroruaddSkip((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu_addClassOrModuleLevelException�s
u)TestSuite._addClassOrModuleLevelExceptionc Cs|j|�}|dkrdS|jr,dSytj|}Wntk
rUdSYnXt|dd�}|dk	r�t|d�ziy|�WnWtk
r�}z7t	|t
�r��nd|}|j|||�WYdd}~XnXWdt|d�XndS(NutearDownModuleu_setupStdoututearDownModule (%s)u_restoreStdout(u_get_previous_moduleuNoneu_moduleSetUpFailedusysumodulesuKeyErrorugetattru_call_if_existsu	Exceptionu
isinstanceu_DebugResultu_addClassOrModuleLevelException(uselfuresultupreviousModuleumoduleutearDownModuleueu	errorName((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu_handleModuleTearDown�s(	
	

*uTestSuite._handleModuleTearDownc	Cs(t|dd�}|j}||kr+dSt|dd	�rAdSt|dd	�rWdSt|dd	�rmdSt|dd�}|dk	r$t|d�zxy|�Wnftk
r}zFt|t�r��ntj	|�}d|}|j
|||�WYdd}~XnXWdt|d�XndS(
Nu_previousTestClassu_classSetupFailedu_moduleSetUpFailedu__unittest_skip__u
tearDownClassu_setupStdoututearDownClass (%s)u_restoreStdoutF(ugetattruNoneu	__class__uFalseu_call_if_existsu	Exceptionu
isinstanceu_DebugResultuutilustrclassu_addClassOrModuleLevelException(	uselfutesturesultu
previousClassucurrentClassu
tearDownClassueu	classNameu	errorName((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu_tearDownPreviousClass�s,	

*u TestSuite._tearDownPreviousClassNF(
u__name__u
__module__u__qualname__u__doc__uFalseurunudebugu_handleClassSetUpu_get_previous_moduleu_handleModuleFixtureu_addClassOrModuleLevelExceptionu_handleModuleTearDownu_tearDownPreviousClass(u
__locals__((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu	TestSuiteKs cBs�|EeZdZdZdZdd�Zdd�Zdd�Zdd	�Z	d
d�Z
dd
�Zdd�Zdd�Z
dS(u_ErrorHolderu�
    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.
    cCs
||_dS(N(udescription(uselfudescription((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu__init__su_ErrorHolder.__init__cCs|jS(N(udescription(uself((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyuid	su_ErrorHolder.idcCsdS(N(uNone(uself((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyushortDescriptionsu_ErrorHolder.shortDescriptioncCsd|jfS(Nu<ErrorHolder description=%r>(udescription(uself((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu__repr__su_ErrorHolder.__repr__cCs
|j�S(N(uid(uself((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu__str__su_ErrorHolder.__str__cCsdS(N((uselfuresult((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyurunsu_ErrorHolder.runcCs
|j|�S(N(urun(uselfuresult((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu__call__su_ErrorHolder.__call__cCsdS(Ni((uself((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyucountTestCasessu_ErrorHolder.countTestCasesN(u__name__u
__module__u__qualname__u__doc__uNoneufailureExceptionu__init__uidushortDescriptionu__repr__u__str__urunu__call__ucountTestCases(u
__locals__((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu_ErrorHolder�su_ErrorHoldercCs+yt|�Wntk
r&dSYnXdS(u?A crude way to tell apart testcases and suites with duck-typingTF(uiteru	TypeErroruTrueuFalse(utest((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu_isnotsuite s

	u_isnotsuitecBs,|EeZdZdZdZdZdZdS(u_DebugResultuCUsed by the TestSuite to hold previous class when running in debug.NF(	u__name__u
__module__u__qualname__u__doc__uNoneu_previousTestClassuFalseu_moduleSetUpFailedu
shouldStop(u
__locals__((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu_DebugResult)su_DebugResultT(u__doc__usysuucaseuutiluTrueu
__unittestu_call_if_existsuobjectu
BaseTestSuiteu	TestSuiteu_ErrorHolderu_isnotsuiteu_DebugResult(((u3/opt/alt/python33/lib64/python3.3/unittest/suite.pyu<module>s;�&