+
    i5$  c                   sb    R t ^ RIt^ RIt^ RIt^RIHt ^ RIHt RtR t	Rt
Rt ! R R	]4      tR# )
zTest result objectN)utilwrapsTc                 s0   a  \        S 4      V 3R  l4       pV# )c                 sb   < \        V R R4      '       d   V P                  4        S! V .VO5/ VB # )failfastF)getattrstop)selfZargsZkwmethods   &*,(/usr/lib64/python3.14/unittest/result.pyinnerZfailfast.<locals>.inner   s0    4U++IIKd(T(R((    r   )r   r	   s   f r   r   r      s     
6]) ) Lr
   z
Stdout:
%sz
Stderr:
%sc                   s   a  ] tR t^t o RtRtRtRtRR ltR t	R t
R tR tR	 tR
 tR t]R 4       t]R 4       tR tR tR tR t]R 4       tR tR tR tR tR tR tR tR tRt V t!R# )
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                s   R V n         . V n        . V n        ^ V n        . V n        . V n        . V n        . V n        R V n        R V n	        R V n
        RV n        RV n        \        P                  V n        \        P                   V n        R V n        R# )FN)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   streamZdescriptionsZ	verbositys   &&&&r   __init__ZTestResult.__init__&   s     "#% "$"" #

 #

"r
   c                    R# )z#Called by TestRunner after test runN r      &r   printErrorsZTestResult.printErrors8       r
   c                sf    V ;P                   ^,          un         RV n        V P                  4        R# )z-Called when the given test is about to be runFN)r   r   _setupStdoutr   test   &&r   	startTestZTestResult.startTest;   s$    "r
   c                s   V P                   '       do   V P                  f5   \        P                  ! 4       V n        \        P                  ! 4       V n        V P                  \
        n        V P                  \
        n        R # R # )N)r   r   ioZStringIOr   r   r   r   r"   r#   r   r&   ZTestResult._setupStdoutA   sR    ;;;""*&(kkm#&(kkm#,,CJ,,CJ r
   c                r    )z`Called once before any tests are executed.

See startTest for a method called before each test.
Nr!   r"   r#   r   startTestRunZTestResult.startTestRunI   r%   r
   c                s4    V P                  4        RV n        R# )z'Called when the given test has been runFN)_restoreStdoutr   r'   r)   r   stopTestZTestResult.stopTestO   s    "r
   c                s,   V P                   '       Ed   V P                  '       d   \        P                  P	                  4       p\        P
                  P	                  4       pV'       dG   VP                  R 4      '       g
   VR ,          pV P                  P                  \        V,          4       V'       dG   VP                  R 4      '       g
   VR ,          pV P                  P                  \        V,          4       V P                  \        n        V P                  \        n        V P                  P                  ^ 4       V P                  P                  4        V P                  P                  ^ 4       V P                  P                  4        R# R# )
N)r   r   r   r   getvaluer   endswithr   ZwriteSTDOUT_LINEr   STDERR_LINEr   ZseekZtruncater   )r   outputerrors   &  r   r-   ZTestResult._restoreStdoutT   s   ;;;!!!,,.

++-!??400$))//f0DE >>$//))//e0CD..CJ..CJ$$Q'((*$$Q'((*% r
   c                r    )z]Called once after all tests are executed.

See stopTest for a method called after each test.
Nr!   r"   r#   r   stopTestRunZTestResult.stopTestRuni   r%   r
   c                j    V P                   P                  WP                  W!4      34       RV n        R# )z]Called 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   r(   err   &&&r   addErrorZTestResult.addErroro   s,    
 	D":":3"EFG!r
   c                r7   )z\Called when an error has occurred. 'err' is a tuple of values as
returned by sys.exc_info().TN)r   r8   r9   r   r:   r<   r   
addFailureZTestResult.addFailurew   s,     	d$<$<S$GHI!r
   c                s    Ve   \        V RR4      '       d   V P                  4        \        V^ ,          VP                  4      '       d   V P                  pMV P
                  pVP                  W P                  W14      34       RV n        R# R# )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().
Nr   FT)	r   r   Z
issubclassfailureExceptionr   r   r8   r9   r   )r   r(   Zsubtestr;   r   s   &&&& r   
addSubTestZTestResult.addSubTest~   sq     ?tZ//		#a&$"7"788MM7$<$<S$GHI!%D r
   c                r    )z-Called when a test has completed successfullyNr!   r'   r)   r   
addSuccessZTestResult.addSuccess   s    r
   c                s>    V P                   P                  W34       R# )zCalled when a test is skipped.N)r   r8   )r   r(   Zreasonr<   r   addSkipZTestResult.addSkip   s    TN+r
   c                s\    V P                   P                  WP                  W!4      34       R# )z/Called when an expected failure/error occurred.N)r   r8   r9   r:   r<   r   addExpectedFailureZTestResult.addExpectedFailure   s'    $$++C67	9r
   c                s<    V P                   P                  V4       R# )z5Called when a test was expected to fail, but succeed.N)r   r8   r'   r)   r   addUnexpectedSuccessZTestResult.addUnexpectedSuccess   s     	  ''-r
   c                sz    \        V R4      '       d)   V P                  P                  \        V4      V34       R# R# )zCalled 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.
r   N)hasattrr   r8   Zstr)r   r(   Zelapsedr<   r   addDurationZTestResult.addDuration   s4     4-..##**CIw+?@ /r
   c                s    \        V P                  4      \        V P                  4      u;8H  ;'       d    ^ 8H  Mu ;'       d2    \        V R4      '       * ;'       g    \        V P                  4      ^ 8H  # )z/Tells whether or not this result was a success.r   )lenr   r   rE   r   r"   r#   r   wasSuccessfulZTestResult.wasSuccessful   s`    
 T]]#s4;;'7<<1< 5 5T#899 4 4T--.!3	6r
   c                s    RV n         R# )z+Indicates that the tests should be aborted.TN)r   r"   r#   r   r   ZTestResult.stop   s	    r
   c                s   Vw  r4pV P                  W4WR4      p\        P                  ! W4VV P                  RR7      p^ RIHp \        V R4      ;'       d    V! V P                  R7      p\        VP                  VR7      4      p	V P                  '       d   \        P                  P                  4       p
\        P                  P                  4       pV
'       d=   V
P                  R4      '       g
   V
R,          p
V	P!                  \"        V
,          4       V'       d=   VP                  R4      '       g
   VR,          pV	P!                  \$        V,          4       RP'                  V	4      # )	z>Converts a sys.exc_info()-style tuple of values into a string.T)Zcapture_localsZcompact)can_colorizer   )Zfile)colorizer/    )_clean_tracebacks	tracebackZTracebackExceptionr   Z	_colorizerI   rE   r   ZlistZformatr   r   r   r0   r   r1   r8   r2   r3   Zjoin)r   r;   r(   exctypevaluetbZtb_erI   rJ   ZmsgLinesr4   r5   s   &&&         r   r9   ZTestResult._exc_info_to_string   s    ##GB=++B>>49 	+4*MM|/MX67;;;ZZ((*FJJ'')Et,,dNFf 45~~d++TMEe 34wwx  r
   c                s$   R pRpWV3.p\        V4      0pV'       d   VP                  4       w  rpV'       d&   V P                  V4      '       d   VP                  pK-  WP                  J d   V P                  V4       V'       d   TpRpMW2n        Vf   K  VP                  VP                  3 F[  p	V	f   K	  \        V	4      V9  g   K  VP                  \        V	4      WP                  34       VP                  \        V	4      4       K]  	  K  V# )NTF)ZidZpop_is_relevant_tb_leveltb_nextr?   _remove_unittest_tb_framesZ__traceback__Z	__cause__Z__context__r8   ZtypeZadd)
r   rN   rO   rP   r(   ZretZfirstZexcsZseenZcs
   &&&&&     r   rL   ZTestResult._clean_tracebacks   s    $%5	{#'88: WR33B77ZZ /////3&(# //5+<+<=A}Ad):T!Wa$ABA > 
r
   c                s4    R VP                   P                  9   # )
__unittest)Ztb_frameZ	f_globals)r   rP   r)   r   rQ   Z TestResult._is_relevant_tb_level   s    r{{4444r
   c                s    RpV'       d(   V P                  V4      '       g   TpVP                  pK/  Ve
   RVn        R# R# )zTruncates 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)rQ   rR   )r   rP   Zprevs   && r   rS   Z%TestResult._remove_unittest_tb_frames   s<     33B77DBDL r
   c                s    R \         P                  ! V P                  4      V P                  \	        V P
                  4      \	        V P                  4      3,          # )z!<%s run=%i errors=%i failures=%i>)r    ZstrclassZ	__class__r   rG   r   r   r"   r#   r   __repr__ZTestResult.__repr__   sA    3dnn-t}}c$++>NDMM"$$ 	%r
   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )NNN)"Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__Z_previousTestClassZ_testRunEnteredZ_moduleSetUpFailedr   r$   r*   r&   r,   r.   r-   r6   r   r=   r>   r@   rA   rB   rC   rD   rF   rH   r   r9   rL   rQ   rS   rU   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      s     	 O#$.-#
+* " " " "&",9
 . .	A6!285 % %r
   r   )rV   r+   r   rM   rK   r    Z	functoolsr   rT   r   r2   r3   Zobjectr   r!   r
   r   <module>rW      s;     	 
   
 k% k%r
   