o ?Og4@sz ddlZddlmZddlmZdZddZGdd d eZGd d d eZGd d d eZ ddZ GdddeZ dS)N)case)utilTcCst||dd}|dS)NcSdSNrrr5/opt/alt/python310/lib64/python3.10/unittest/suite.py sz!_call_if_exists..)getattr)parentattrfuncrrr_call_if_exists s rc@sleZdZ dZdddZddZddZd 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__" zBaseTestSuite.__iter__cCs$|j}|D] }|r||7}q|Sr)rcountTestCases)rcasestestrrrr#%s  zBaseTestSuite.countTestCasescCsLt|s tdt|t|trt|tjt frtd|j |dS)Nz{} is not callablezNTestCases and TestSuites must be instantiated before passing them to addTest()) callable TypeErrorformatreprrtype issubclassrZTestCase TestSuiterappendrr%rrraddTest,szBaseTestSuite.addTestcCs*t|tr td|D]}||q dS)Nz0tests must be an iterable of tests, not a string)rstrr'r/)rrr%rrrr6s  zBaseTestSuite.addTestscCs:t|D]\}}|jr|S|||jr||q|Sr) enumerate shouldStop_cleanup_removeTestAtIndex)rresultindexr%rrrrun<s zBaseTestSuite.runcCsP z|j|}Wn tyYdSwt|dr!|j|7_d|j|<dS)Nr#)rr'hasattrrr#)rr6r%rrrr4Es  z BaseTestSuite._removeTestAtIndexcOs|j|i|Srr7)rargskwdsrrr__call__SszBaseTestSuite.__call__cCs |D]}|qdSr)debugr.rrrr=Vs zBaseTestSuite.debugN)r)__name__ __module__ __qualname__r3rrrr!r#r/rr7r4r<r=rrrrrs    rc@s`eZdZ dddZddZddZdd Zd d Z dd dZ dddZ ddZ ddZ d S)r,FcCsd}t|dddurd|_}t|D]D\}}|jrnr?r@r7r=rGr[rFrSrcrIrErrrrr,\s !.&   #r,c@sReZdZ dZddZddZddZdd Zd d Zd d Z ddZ ddZ dS)rgNcCs ||_dSr description)rrlrrrrTr"z_ErrorHolder.__init__cCs|jSrrkrrrridWsz_ErrorHolder.idcCrrrrrrrshortDescriptionZz_ErrorHolder.shortDescriptioncCs d|jfS)Nzrkrrrrr]s z_ErrorHolder.__repr__cCs|Sr)rmrrrr__str__`sz_ErrorHolder.__str__cCrrrrr5rrrr7csz_ErrorHolder.runcCs ||Srr9rqrrrr<hr"z_ErrorHolder.__call__cCsdSrrrrrrr#kroz_ErrorHolder.countTestCases) r>r?r@ZfailureExceptionrrmrnrrpr7r<r#rrrrrgHs  rgcCs& zt|WdStyYdSw)NTF)r r')r%rrrrDns  rDc@seZdZ dZdZdZdS)rJNF)r>r?r@rHrCr2rrrrrJws rJ) r]rrZ __unittestrobjectrr,rgrDrJrrrrs  Lm&