/opt/alt/python39/lib64/python3.9/unittest/__pycache__
NameSizeModeActions
async_case.cpython-39.opt-1.pyc45920644editdlrm
async_case.cpython-39.opt-2.pyc45920644editdlrm
async_case.cpython-39.pyc47840644editdlrm
case.cpython-39.opt-1.pyc481310644editdlrm
case.cpython-39.opt-2.pyc331470644editdlrm
case.cpython-39.pyc481800644editdlrm
loader.cpython-39.opt-1.pyc144400644editdlrm
loader.cpython-39.opt-2.pyc117550644editdlrm
loader.cpython-39.pyc145310644editdlrm
main.cpython-39.opt-1.pyc75430644editdlrm
main.cpython-39.opt-2.pyc73650644editdlrm
main.cpython-39.pyc75430644editdlrm
mock.cpython-39.opt-1.pyc780050644editdlrm
mock.cpython-39.opt-2.pyc585940644editdlrm
mock.cpython-39.pyc780320644editdlrm
result.cpython-39.opt-1.pyc79720644editdlrm
result.cpython-39.opt-2.pyc61030644editdlrm
result.cpython-39.pyc79720644editdlrm
runner.cpython-39.opt-1.pyc72020644editdlrm
runner.cpython-39.opt-2.pyc65870644editdlrm
runner.cpython-39.pyc72020644editdlrm
signals.cpython-39.opt-1.pyc22550644editdlrm
signals.cpython-39.opt-2.pyc22550644editdlrm
signals.cpython-39.pyc22550644editdlrm
suite.cpython-39.opt-1.pyc101170644editdlrm
suite.cpython-39.opt-2.pyc91010644editdlrm
suite.cpython-39.pyc101170644editdlrm
util.cpython-39.opt-1.pyc43990644editdlrm
util.cpython-39.opt-2.pyc36790644editdlrm
util.cpython-39.pyc44510644editdlrm
_log.cpython-39.opt-1.pyc25360644editdlrm
_log.cpython-39.opt-2.pyc23710644editdlrm
_log.cpython-39.pyc25360644editdlrm
__init__.cpython-39.opt-1.pyc34110644editdlrm
__init__.cpython-39.opt-2.pyc16500644editdlrm
__init__.cpython-39.pyc34110644editdlrm
__main__.cpython-39.opt-1.pyc4140644editdlrm
__main__.cpython-39.opt-2.pyc3810644editdlrm
__main__.cpython-39.pyc4140644editdlrm
Edit: /opt/alt/python39/lib64/python3.9/unittest/__pycache__/result.cpython-39.pyc (7972B)
a XC?h @s\dZddlZddlZddlZddlmZddlmZdZddZ d Z d Z Gd d d e Z dS) zTest result objectN)utilwrapsTcstfdd}|S)Ncs*t|ddr||g|Ri|S)NfailfastF)getattrstop)selfargskwmethod4/opt/alt/python39/lib64/python3.9/unittest/result.pyinner s zfailfast..innerr)r rrr rr srz Stdout: %sz Stderr: %sc@seZdZdZdZdZdZd0ddZddZdd Z d d Z d d Z ddZ ddZ ddZeddZeddZddZddZddZddZed d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/ZdS)1 TestResultaHolder for test result information. Test results are automatically managed by the TestCase and TestSuite classes, and do not need to be explicitly manipulated by writers of tests. Each instance holds the total number of tests run, and collections of failures and errors that occurred among those test runs. The collections contain tuples of (testcase, exceptioninfo), where exceptioninfo is the formatted traceback of the error that occurred. NFcCsbd|_g|_g|_d|_g|_g|_g|_d|_d|_d|_ d|_ d|_ t j |_t j|_d|_dS)NFr)rfailureserrorstestsRunskippedexpectedFailuresunexpectedSuccesses shouldStopbuffer tb_locals_stdout_buffer_stderr_buffersysstdout_original_stdoutstderr_original_stderr _mirrorOutput)r streamZ descriptions verbosityrrr__init__&szTestResult.__init__cCsdS)z#Called by TestRunner after test runNrr rrr printErrors7szTestResult.printErrorscCs |jd7_d|_|dS)z-Called when the given test is about to be runrFN)rr" _setupStdoutr testrrr startTest:szTestResult.startTestcCs8|jr4|jdur$t|_t|_|jt_|jt_dS)N)rrioStringIOrrrr r&rrrr(@s    zTestResult._setupStdoutcCsdS)zpCalled once before any tests are executed. See startTest for a method called before each test. Nrr&rrr startTestRunHszTestResult.startTestRuncCs|d|_dS)z'Called when the given test has been runFN)_restoreStdoutr"r)rrrstopTestNszTestResult.stopTestcCs|jr|jrltj}tj}|rF|ds6|d7}|jt ||rl|ds\|d7}|j t ||jt_|j t_|j d|j |j d|jdS)N r)rr"rrgetvaluer endswithrwrite STDOUT_LINEr! STDERR_LINErseektruncater)r outputerrorrrrr/Ss$       zTestResult._restoreStdoutcCsdS)zmCalled once after all tests are executed. See stopTest for a method called after each test. Nrr&rrr stopTestRunhszTestResult.stopTestRuncCs"|j||||fd|_dS)zmCalled when an error has occurred. 'err' is a tuple of values as returned by sys.exc_info(). TN)rappend_exc_info_to_stringr"r r*errrrraddErrornszTestResult.addErrorcCs"|j||||fd|_dS)zdCalled when an error has occurred. 'err' is a tuple of values as returned by sys.exc_info().TN)rr<r=r"r>rrr addFailurevszTestResult.addFailurecCsZ|durVt|ddr|t|d|jr4|j}n|j}|||||fd|_dS)zCalled at the end of a subtest. 'err' is None if the subtest ended successfully, otherwise it's a tuple of values as returned by sys.exc_info(). NrFrT) rr issubclassfailureExceptionrrr<r=r")r r*Zsubtestr?rrrr addSubTest}s zTestResult.addSubTestcCsdS)z-Called when a test has completed successfullyNrr)rrr addSuccessszTestResult.addSuccesscCs|j||fdS)zCalled when a test is skipped.N)rr<)r r*reasonrrraddSkipszTestResult.addSkipcCs|j||||fdS)z/Called when an expected failure/error occurred.N)rr<r=r>rrraddExpectedFailureszTestResult.addExpectedFailurecCs|j|dS)z5Called when a test was expected to fail, but succeed.N)rr<r)rrraddUnexpectedSuccessszTestResult.addUnexpectedSuccesscCs>t|jt|jkodknoConverts a sys.exc_info()-style tuple of values into a string.)capture_localsr1)_clean_tracebacks tracebackTracebackExceptionrlistformatrrrr2r r3r<r5r6join) r r?r*exctypevaluetbZtb_eZmsgLinesr9r:rrrr=s$       zTestResult._exc_info_to_stringc Csd}d}|||fg}|r|\}}}|r<||r<|j}q&||jurP|||r^|}d}n||_|dur|j|jfD]"}|durx|t |||jfqxq|S)NTF) pop_is_relevant_tb_leveltb_nextrC_remove_unittest_tb_frames __traceback__ __cause__ __context__r<type) r rUrVrWr*ZretfirstZexcscrrrrOs$   zTestResult._clean_tracebackscCs d|jjvS)N __unittest)tb_frame f_globals)r rWrrrrYsz TestResult._is_relevant_tb_levelcCs0d}|r||s|}|j}q|dur,d|_dS)aTruncates usercode tb at the first unittest frame. If the first frame of the traceback is in user code, the prefix up to the first unittest frame is returned. If the first frame is already in the unittest module, the traceback is not modified. N)rYrZ)r rWprevrrrr[s z%TestResult._remove_unittest_tb_framescCs&dt|j|jt|jt|jfS)Nz!<%s run=%i errors=%i failures=%i>)rZstrclass __class__rrJrrr&rrr__repr__s zTestResult.__repr__)NNN)__name__ __module__ __qualname____doc__Z_previousTestClassZ_testRunEnteredZ_moduleSetUpFailedr%r'r+r(r.r0r/r;rr@rArDrErGrHrIrLrr=rOrYr[rgrrrrrs:      r)rkr,rrPrNr functoolsrrbrr5r6objectrrrrrs