U if2@sxddlZddlmZddlmZdZddZGdd d eZGd d d eZGd d d eZ ddZ GdddeZ dS)N)case)utilTcCst||dd}|dS)NcSsdSNrrr3/opt/alt/python38/lib64/python3.8/unittest/suite.py z!_call_if_exists..)getattr)parentattrfuncrrr_call_if_exists src@sjeZdZdZdddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZdS) BaseTestSuiteTrcCsg|_d|_||dSNr)_tests_removed_testsaddTests)selftestsrrr__init__szBaseTestSuite.__init__cCsdt|jt|fS)Nz <%s tests=%s>)rstrclass __class__listrrrr__repr__szBaseTestSuite.__repr__cCs t||jstSt|t|kSr) isinstancerNotImplementedr)rotherrrr__eq__s zBaseTestSuite.__eq__cCs t|jSr)iterrrrrr__iter__"szBaseTestSuite.__iter__cCs$|j}|D]}|r ||7}q |Sr)rcountTestCases)rZcasestestrrrr"%s zBaseTestSuite.countTestCasescCsLt|stdt|t|tr        zTestSuite._handleModuleFixtureNcCs$|d|d}|||||dS)Nz ())_addClassOrModuleLevelException)rr3rVZ method_namer rN errorNamerrrrRsz,TestSuite._createClassOrModuleLevelExceptioncCs^t|}t|dd}|dk r8t|tjr8||t|n"|sN||tn |||dS)NaddSkip) _ErrorHolderr rrZSkipTestr.ZaddErrorr\exc_info)rr3Z exceptionrcrNerrorrdrrrrbs z)TestSuite._addClassOrModuleLevelExceptioncCs||}|dkrdS|jr dSztj|}Wntk rDYdSXt|dd}|dk rt|dzNz |Wn>t k r}z t |t r| ||d|W5d}~XYnXW5t|dz tWn4t k r}z| ||d|W5d}~XYnXXdS)NtearDownModulerKrL) rZrAr\r]r^r rrr_rSrRrrH)rr3rYr`rhrXrrrrGs:        zTestSuite._handleModuleTearDownc Cst|dd}|j}||krdSt|ddr.dSt|ddr>dSt|ddrNdSt|dd}|dk rt|dzXz |WnHt k r}z*t |t rt|}|||d|W5d}~XYnXW5t|d|t|jd kr|jD]&}t|}|j||d d||d qXdS) NrFr@FrArI tearDownClassrKrLrrrM) r rrrOrPrQrrrRrSrrH) rr#r3rTrUrirVrWrXrrrrCsB              z TestSuite._tearDownPreviousClass)F)N)N) r<r=r>r5r;rErZrDrRrbrGrCrrrrr*\s !($   r*c@sPeZdZdZddZddZddZdd Zd d Zd d Z ddZ ddZ dS)reNcCs ||_dSr description)rrkrrrrBsz_ErrorHolder.__init__cCs|jSrrjrrrridEsz_ErrorHolder.idcCsdSrrrrrrshortDescriptionHsz_ErrorHolder.shortDescriptioncCs d|jfS)NzrjrrrrrKsz_ErrorHolder.__repr__cCs|Sr)rlrrrr__str__Nsz_ErrorHolder.__str__cCsdSrrrr3rrrr5Qsz_ErrorHolder.runcCs ||Srr7rorrrr:Vsz_ErrorHolder.__call__cCsdSrrrrrrr"Ysz_ErrorHolder.countTestCases) r<r=r>ZfailureExceptionrrlrmrrnr5r:r"rrrrre6s recCs(z t|Wntk r"YdSXdS)NTF)r r%)r#rrrrB\s  rBc@seZdZdZdZdZdS)rHNF)r<r=r>rFrAr0rrrrrHesrH) r\rrZ __unittestrobjectrr*rerBrHrrrrs  L[&