Ë ‚Ö¦iª#ãó`—dZddlZddlZddlZddlmZddlmZdZd„Z dZ d Z Gd „d e «Z y) zTest result objectéNé)Úutil©ÚwrapsTcó.‡—t‰«ˆfd„«}|S)NcóV•—t|dd«r|j«‰|g|¢­i|¤ŽS)NÚfailfastF)ÚgetattrÚstop)ÚselfÚargsÚkwÚmethods €ú(/usr/lib64/python3.12/unittest/result.pyÚinnerzfailfast..inner s-ø€ä �4˜ UÔ +Ø �I‰IŒKÙ�dÐ(˜TÒ( RÑ(Ð(ór)rrs` rr r s ø€Ü ˆ6ƒ]ó)óð)ð €Lrz Stdout: %sz Stderr: %scóÆ—eZdZdZdZdZdZdd„Zd„Zd„Z d„Z d„Z d „Z d „Z d „Zed „«Zed „«Zd„Zd„Zd„Zd„Zed„«Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zy)Ú TestResultaÙHolder 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. NFcó—d|_g|_g|_d|_g|_g|_g|_g|_d|_d|_ d|_ d|_ d|_ tj|_tj |_d|_y)NFr)r ÚfailuresÚerrorsÚtestsRunÚskippedÚexpectedFailuresÚunexpectedSuccessesÚcollectedDurationsÚ shouldStopÚbufferÚ tb_localsÚ_stdout_bufferÚ_stderr_bufferÚsysÚstdoutÚ_original_stdoutÚstderrÚ_original_stderrÚ _mirrorOutput)r ÚstreamÚ descriptionsÚ verbositys rÚ__init__zTestResult.__init__&s‚€ØˆŒ ؈Œ ؈Œ ؈Œ ؈Œ Ø "ˆÔØ#%ˆÔ Ø"$ˆÔ؈ŒØˆŒ ؈ŒØ"ˆÔØ"ˆÔÜ #§ ¡ ˆÔÜ #§ ¡ ˆÔØ"ˆÕrcó—y)z#Called by TestRunner after test runN©©r s rÚ printErrorszTestResult.printErrors8ó�rcó\—|xjdz c_d|_|j«y)z-Called when the given test is about to be runrFN)rr'Ú _setupStdout©r Útests rÚ startTestzTestResult.startTest;s$€à � Š ˜Ñ� Ø"ˆÔØ ×ÑÕrcóî—|jri|j€2tj«|_tj«|_|jt _|jt _yy)N)rr!ÚioÚStringIOr r"r#r%r.s rr2zTestResult._setupStdoutAsP€Ø �;Š;Ø×"Ñ"Ð*Ü&(§k¡k£m�Ô#Ü&(§k¡k£m�Ô#Ø×,Ñ,ŒCŒJØ×,Ñ,ŒC�Jð rcó—y)zpCalled once before any tests are executed. See startTest for a method called before each test. Nr-r.s rÚ startTestRunzTestResult.startTestRunIr0rcó2—|j«d|_y)z'Called when the given test has been runFN)Ú_restoreStdoutr'r3s rÚstopTestzTestResult.stopTestOs€à ×ÑÔØ"ˆÕrcóÀ—|j�rQ|jr°tjj «}tj j «}|r8|j d«s|dz }|jjt|z«|r8|j d«s|dz }|jjt|z«|jt_|jt_|jjd«|jj«|jjd«|jj«yy)NÚ r)rr'r"r#Úgetvaluer%Úendswithr$ÚwriteÚ STDOUT_LINEr&Ú STDERR_LINEr ÚseekÚtruncater!)r ÚoutputÚerrors rr<zTestResult._restoreStdoutTs€Ø �;‹;Ø×!Ò!ÜŸ™×,Ñ,Ó.�ÜŸ ™ ×+Ñ+Ó-�ÙØ!Ÿ?™?¨4Ô0Ø $™˜Ø×)Ñ)×/Ñ/´ ¸fÑ0DÔEÙØ Ÿ>™>¨$Ô/Ø ™ ˜Ø×)Ñ)×/Ñ/´ ¸eÑ0CÔDà×.Ñ.ŒCŒJØ×.Ñ.ŒCŒJØ × Ñ × $Ñ $ QÔ 'Ø × Ñ × (Ñ (Ô *Ø × Ñ × $Ñ $ QÔ 'Ø × Ñ × (Ñ (Õ *ð% rcó—y)zmCalled once after all tests are executed. See stopTest for a method called after each test. Nr-r.s rÚ stopTestRunzTestResult.stopTestRunir0rcól—|jj||j||«f«d|_y)zmCalled when an error has occurred. 'err' is a tuple of values as returned by sys.exc_info(). TN)rÚappendÚ_exc_info_to_stringr'©r r4Úerrs rÚaddErrorzTestResult.addErroros0€ð � ‰ ×јD $×":Ñ":¸3ÀÓ"EÐFÔGØ!ˆÕrcól—|jj||j||«f«d|_y)zdCalled when an error has occurred. 'err' is a tuple of values as returned by sys.exc_info().TN)rrLrMr'rNs rÚ addFailurezTestResult.addFailurews0€ð � ‰ ×јd D×$<Ñ$<¸SÀ$Ó$GÐHÔIØ!ˆÕrcóü—|�zt|dd«r|j«t|d|j«r |j}n |j }|j ||j||«f«d|_yy)z©Called 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(). Nr FrT) r r Ú issubclassÚfailureExceptionrrrLrMr')r r4ÚsubtestrOrs rÚ addSubTestzTestResult.addSubTest~so€ð ˆ?Ü�t˜Z¨Ô/Ø— ‘ ” ܘ#˜a™& $×"7Ñ"7Ô8ØŸ™‘àŸ™�Ø �M‰M˜7 D×$<Ñ$<¸SÀ$Ó$GÐHÔ IØ!%ˆDÕ ð rcó—y)z-Called when a test has completed successfullyNr-r3s rÚ addSuccesszTestResult.addSuccess�s€à rcó>—|jj||f«y)zCalled when a test is skipped.N)rrL)r r4Úreasons rÚaddSkipzTestResult.addSkip“s€à � ‰ ×јT 6˜NÕ+rcó^—|jj||j||«f«y)z/Called when an expected failure/error occurred.N)rrLrMrNs rÚaddExpectedFailurezTestResult.addExpectedFailure—s+€à ×Ñ×$Ñ$Ø �4×+Ñ+¨C°Ó6Ð 7õ 9rcó:—|jj|«y)z5Called when a test was expected to fail, but succeed.N)rrLr3s rÚaddUnexpectedSuccesszTestResult.addUnexpectedSuccessœs€ð × Ñ ×'Ñ'¨Õ-rcój—t|d«r'|jjt|«|f«yy)zûCalled when a test finished to run, regardless of its outcome. *test* is the test case corresponding to the test method. *elapsed* is the time represented in seconds, and it includes the execution of cleanup functions. rN)ÚhasattrrrLÚstr)r r4Úelapseds rÚ addDurationzTestResult.addDuration¡s1€ô �4Ð-Ô .à × #Ñ #× *Ñ *¬C°«I°wÐ+?Õ @ð /rcóÀ—t|j«t|j«cxk(xrdk(ncxr't|d« xst|j«dk(S)z/Tells whether or not this result was a success.rr)Úlenrrrbrr.s rÚ wasSuccessfulzTestResult.wasSuccessful¬sS€ô �T—]‘]Ó#¤s¨4¯;©;Ó'7Ö<¸1Ô<ò5ܘTÐ#8Ó9Ð9ò4Ü�T×-Ñ-Ó.°!Ñ3ð 6rcó—d|_y)z+Indicates that the tests should be aborted.TN)rr.s rr zTestResult.stopµs €àˆ�rcó"—|\}}}|j||||«}tj||||jd¬«}t |j ««}|j rœtjj«}tjj«} |r.|jd«s|dz }|jt|z«| r.| jd«s| dz } |jt| z«dj|«S)z>Converts a sys.exc_info()-style tuple of values into a string.T)Úcapture_localsÚcompactr?Ú)Ú_clean_tracebacksÚ tracebackÚTracebackExceptionrÚlistÚformatrr"r#r@r%rArLrCrDÚjoin) r rOr4ÚexctypeÚvalueÚtbÚtb_eÚmsgLinesrGrHs rrMzTestResult._exc_info_to_string¹sâ€à ш�˜Ø × #Ñ # G¨U°B¸Ó =ˆÜ×+Ñ+Ø �U˜BØŸ>™>°4ô9ˆô˜Ÿ ™ › Ó&ˆà �;Š;Ü—Z‘Z×(Ñ(Ó*ˆFÜ—J‘J×'Ñ'Ó)ˆEÙØ—‘ tÔ,ؘd‘N�FØ—‘¤ ¨fÑ 4Ô5ÙØ—~‘~ dÔ+ؘT‘M�EØ—‘¤ ¨eÑ 3Ô4Ø�w‰w�xÓ Ð rcó—d}d}|||fg}t|«h}|rè|j«\}}}|r1|j|«r |j}|r|j|«rŒ ||jur|j |«|r|}d}n||_|�o|j|jfD]T} | €Œt| «|vsŒ|jt| «| | j f«|jt| ««ŒV|rŒè|S)NTF) ÚidÚpopÚ_is_relevant_tb_levelÚtb_nextrUÚ_remove_unittest_tb_framesÚ __traceback__Ú __cause__Ú __context__rLÚtypeÚadd) r rtrurvr4ÚretÚfirstÚexcsÚseenÚcs rrnzTestResult._clean_tracebacksÏsþ€ØˆØˆØ˜% Ð$Ð%ˆÜ�5“ ˆ{ˆÙØ#'§8¡8£:Ñ ˆW�e˜Rá˜×3Ñ3°BÔ7Ø—Z‘Z�ñ˜×3Ñ3°BÕ7ð˜$×/Ñ/Ñ/Ø×/Ñ/°Ô3áØ�Ø‘à&(�Ô#àÐ ØŸ/™/¨5×+<Ñ+<Ó=�AØ‘}¬¨A«°dÒ):ØŸ ™ ¤T¨!£W¨a°·±Ð$AÔBØŸ™¤ A£�ð>ò#ð*ˆ rcó2—d|jjvS)NÚ __unittest)Útb_frameÚ f_globals)r rvs rr|z TestResult._is_relevant_tb_levelës€Ø˜rŸ{™{×4Ñ4Ð4Ð4rcó†—d}|r3|j|«s"|}|j}|r|j|«sŒ"|�d|_yy)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)r|r})r rvÚprevs rr~z%TestResult._remove_unittest_tb_framesîsM€ðˆÙ˜×3Ñ3°BÔ7؈DØ—‘ˆBñ˜×3Ñ3°BÕ7ð Р؈D�Lð rcó®—dtj|j«|jt |j «t |j «fzS)Nz!<%s run=%i errors=%i failures=%i>)rÚstrclassÚ __class__rrgrrr.s rÚ__repr__zTestResult.__repr__ýsA€Ø3Ü— ‘ ˜dŸn™nÓ-¨t¯}©}¼cÀ$Ç+Á+Ó>NÜ�D—M‘MÓ"ð$ñ$ð %r)NNN)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú_previousTestClassÚ_testRunEnteredÚ_moduleSetUpFailedr+r/r5r2r:r=r<rJr rPrRrWrYr\r^r`rerhr rMrnr|r~r’r-rrrrs»„ñ ðÐØ€OØÐó#ò$.òò -ò ò #ò +ò* ð ñ"óð"ðñ"óð"ò &ò" ò,ò9ð ñ.óð.ò Aò6òò!ò,ò85ò  ó%rr)r–r7r"rormrÚ functoolsrrŠr rCrDÚobjectrr-rrÚrœs;ðÙã Û ÛåÝà € òð€ Ø€ ôh%�õh%r