JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrB  fW@sndZddlZddlZddlZddlmZddlmZdZGddde Z Gd d d ej Z Gd d d e Z dS) z Running testsN)result)registerResultTc@s*eZdZdZddZddZd ddZdS) _WritelnDecoratorz@Used to decorate file-like objects with a handy 'writeln' methodcCs ||_dS)N)stream)selfrr4/opt/alt/python37/lib64/python3.7/unittest/runner.py__init__sz_WritelnDecorator.__init__cCs|dkrt|t|j|S)N)r __getstate__)AttributeErrorgetattrr)rattrrrr __getattr__sz_WritelnDecorator.__getattr__NcCs|r|||ddS)N )write)rargrrr writelns z_WritelnDecorator.writeln)N)__name__ __module__ __qualname____doc__r rrrrrr r srcseZdZdZdZdZfddZddZfdd Zfd d Z fd d Z fddZ fddZ fddZ fddZddZddZZS)TextTestResultzhA test result class that can print formatted text results to a stream. Used by TextTestRunner. zF======================================================================zF----------------------------------------------------------------------cs8tt||||||_|dk|_|dk|_||_dS)Nr)superrr rshowAlldots descriptions)rrr verbosity) __class__rr r %s   zTextTestResult.__init__cCs0|}|jr$|r$dt||fSt|SdS)Nr)ZshortDescriptionrjoinstr)rtestZdoc_first_linerrr getDescription,s zTextTestResult.getDescriptioncsBtt|||jr>|j|||jd|jdS)Nz ... )rr startTestrrrr"flush)rr!)rrr r#3s  zTextTestResult.startTestcsDtt|||jr$|jdn|jr@|jd|jdS)Nok.) rr addSuccessrrrrrr$)rr!)rrr r':s  zTextTestResult.addSuccesscsFtt||||jr&|jdn|jrB|jd|jdS)NERRORE) rraddErrorrrrrrr$)rr!err)rrr r*Bs  zTextTestResult.addErrorcsFtt||||jr&|jdn|jrB|jd|jdS)NFAILF) rr addFailurerrrrrr$)rr!r+)rrr r.Js  zTextTestResult.addFailurecsLtt||||jr,|jd|n|jrH|jd|j dS)Nz skipped {0!r}s) rraddSkiprrrformatrrr$)rr!reason)rrr r0Rs  zTextTestResult.addSkipcsFtt||||jr&|jdn|jrB|jd|jdS)Nzexpected failurex) rraddExpectedFailurerrrrrr$)rr!r+)rrr r4Zs  z!TextTestResult.addExpectedFailurecsDtt|||jr$|jdn|jr@|jd|jdS)Nzunexpected successu) rraddUnexpectedSuccessrrrrrr$)rr!)rrr r6bs  z#TextTestResult.addUnexpectedSuccesscCs6|js |jr|j|d|j|d|jdS)Nr(r,)rrrrprintErrorListerrorsfailures)rrrr printErrorsjs  zTextTestResult.printErrorscCs\xV|D]N\}}|j|j|jd|||f|j|j|jd|qWdS)Nz%s: %sz%s)rr separator1r" separator2)rZflavourr8r!r+rrr r7ps zTextTestResult.printErrorList)rrrrr;r<r r"r#r'r*r.r0r4r6r:r7 __classcell__rr)rr rs        rc@s4eZdZdZeZd ddddZd d Zd d ZdS)TextTestRunnerzA test runner class that displays results in textual form. It prints out the names of tests as they are run, errors as they occur, and a summary of the results at the end of the test run. NTrF) tb_localsc CsN|dkrtj}t||_||_||_||_||_||_||_ |dk rJ||_ dS)zConstruct a TextTestRunner. Subclasses should accept **kwargs to ensure compatibility as the interface changes. N) sysstderrrrrrfailfastbufferr?warnings resultclass) rrrrrBrCrErDr?rrr r s zTextTestRunner.__init__cCs||j|j|jS)N)rErrr)rrrr _makeResultszTextTestRunner._makeResultc Cs2|}t||j|_|j|_|j|_t|jr^t|j|jdkr^tjdt ddt }t |dd}|dk r|z ||Wdt |dd}|dk r|Xt }WdQRX||}| t|dr|j|j|j}|jd ||d kod pd |f|jd } } } ytt|j|j|jf} Wntk rTYn X| \} } } g} |s|jdt|jt|j}}|r| d||r| d|n |jd| r| d| | r| d| | r| d| | r"|jdd| fn |jd|S)z&Run the given test case or test suite.)defaultalwaysmodulezPlease use assert\w+ instead.)categorymessage startTestRunN stopTestRunr<zRan %d test%s in %.3fsrr/rZFAILEDz failures=%dz errors=%dZOKz skipped=%dzexpected failures=%dzunexpected successes=%dz (%s)z, r)rFrrBrCr?rDcatch_warnings simplefilterfilterwarningsDeprecationWarningtimeZ perf_counterr r:hasattrrrr<ZtestsRunmaplenZexpectedFailuresunexpectedSuccessesskippedr Z wasSuccessfulrr9r8appendr)rr!rZ startTimerLrMZstopTimeZ timeTakenrunZ expectedFailsrWrXZresultsZinfosZfailedZerroredrrr rZsr              zTextTestRunner.run)NTrFFNN) rrrrrrEr rFrZrrrr r>xsr>)rr@rSrDrNrZsignalsrZ __unittestobjectrZ TestResultrr>rrrr s  [