
    XiZ                       S SK Jr  S SKJr  S SKJr  S SKJr  S SKJr  S SKrS SKJ	r	  S SK
r
S SKJr  S SKrS S	KJr  S S
KJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SKJr  S SK J!r!  S SK"J#r#  S SK$J%r%  S SK$J&r&  S SK'J(r(  S SK'J)r)  \RT                  S :  a  S S!K+J,r,  \(       a  S S"K-J.r.  S S#K/J0r0  S$ r1 " S% S&5      r2      S4S' jr3      S5S( jr4      S6S) jr5 " S* S+\25      r6\ " S, S-\25      5       r7 " S. S/\5      r8    S7S0 jr9    S8S1 jr:S9S2 jr;S:S3 jr<g);    )annotations)Iterable)Iterator)Mapping)SequenceN)StringIO)pprint)Any)cast)final)Literal)NoReturn)TYPE_CHECKING)ExceptionChainRepr)ExceptionInfo)ExceptionRepr)	ReprEntry)ReprEntryNative)ReprExceptionInfoReprFileLocation)ReprFuncArgs)
ReprLocalsReprTraceback)TerminalRepr)TerminalWriter)Config)	Collector)Item)fail)skip)      )BaseExceptionGroup)Self)CallInfoc                     U R                   $ ! [         aI    U R                  nSR                  " US   S S 6 nSR                  US   US   X!S   5      =U l         nUs $ f = f)Nz{}.{}.{}version_infor#   z[{}] {} -- Python {} {}idsysplatform
executable)_workerinfocacheAttributeError
workerinfoformat)nodedverss       B/var/www/html/venv/lib/python3.13/site-packages/_pytest/reports.pygetworkerinfoliner6   1   s|    $$$ OO>!22A!67$=$D$DdGQ}%slO%
 	
 s    AA! A!c                     \ rS rSr% S\S'   S\S'   S\S'   S\S	'   S
\S'   S\S'   S!S jr\(       a  S"S jrS#S jrS$S jr	\
S%S j5       r\
S%S j5       r\
S%S j5       r\
S%S j5       r\
S&S j5       r\
S&S j5       r\
S&S j5       r\
S%S j5       r\
S&S j5       r\
S'S j5       r      S(S jrS)S jr\S*S j5       rSrg )+
BaseReport=   
str | Nonewhen"tuple[str, int | None, str] | NonelocationONone | ExceptionInfo[BaseException] | tuple[str, int, str] | str | TerminalReprlongreprzlist[tuple[str, str]]sectionsstrnodeid&Literal['passed', 'failed', 'skipped']outcomec                :    U R                   R                  U5        g N)__dict__update)selfkws     r5   __init__BaseReport.__init__G   s    R     c                    g rF    )rI   keys     r5   __getattr__BaseReport.__getattr__L   s    rM   c                d   [        U S5      (       a-  [        U R                  5      nU(       a  UR                  U5        U R                  nUc  g [        US5      (       a"  [        [        U5      nUR                  U5        g  [        U5      nUR                  U5        g ! [         a    Sn N f = f)Nr1   
toterminalz<unprintable longrepr>)
hasattrr6   r1   liner?   r   r   rT   rA   UnicodeEncodeError)rI   outworker_infor?   longrepr_terminalr4   s         r5   rT   BaseReport.toterminalN   s    4  +DII6K%==8\** $\8 <((--M HHQK & -,-s   B   B/.B/c              #  p   #    U R                    H"  u  p#UR                  U5      (       d  M  X4v   M$     g 7frF   )r@   
startswith)rI   prefixnamecontents       r5   get_sectionsBaseReport.get_sectionsb   s,     !]]MDv&&o% +s   &6
6c                    [        5       n[        U5      nSUl        U R                  U5        UR	                  5       nUR                  5       $ )zgRead-only property that returns the full string representation of
``longrepr``.

.. versionadded:: 3.0
F)r   r   	hasmarkuprT   getvaluestrip)rI   filetwexcs       r5   longreprtextBaseReport.longreprtextg   s?     zD!mmoyy{rM   c                P    SR                  S U R                  S5       5       5      $ )zOReturn captured log lines, if log capturing is enabled.

.. versionadded:: 3.5

c              3  *   #    U  H	  u  pUv   M     g 7frF   rO   .0r^   r`   s      r5   	<genexpr>$BaseReport.caplog.<locals>.<genexpr>{   s      
-N)G-N   zCaptured logjoinra   rI   s    r5   caplogBaseReport.caplogu   s-     yy 
-1->->~-N
 
 	
rM   c                P    SR                  S U R                  S5       5       5      $ )zRReturn captured text from stdout, if capturing is enabled.

.. versionadded:: 3.0
 c              3  *   #    U  H	  u  pUv   M     g 7frF   rO   ro   s      r5   rq   'BaseReport.capstdout.<locals>.<genexpr>         
-Q)G-Qrs   zCaptured stdoutrt   rv   s    r5   	capstdoutBaseReport.capstdout   .     ww 
-1->->?P-Q
 
 	
rM   c                P    SR                  S U R                  S5       5       5      $ )zRReturn captured text from stderr, if capturing is enabled.

.. versionadded:: 3.0
rz   c              3  *   #    U  H	  u  pUv   M     g 7frF   rO   ro   s      r5   rq   'BaseReport.capstderr.<locals>.<genexpr>   r}   rs   zCaptured stderrrt   rv   s    r5   	capstderrBaseReport.capstderr   r   rM   c                     U R                   S:H  $ )zWhether the outcome is passed.passedrD   rv   s    r5   r   BaseReport.passed        ||x''rM   c                     U R                   S:H  $ )zWhether the outcome is failed.failedr   rv   s    r5   r   BaseReport.failed   r   rM   c                     U R                   S:H  $ )zWhether the outcome is skipped.skippedr   rv   s    r5   r   BaseReport.skipped   s     ||y((rM   c                >    U R                   R                  S5      S   $ )z3The path portion of the reported node, as a string.z::r   )rB   splitrv   s    r5   fspathBaseReport.fspath   s     {{  &q))rM   c                    g)a  **Experimental** Whether this report should be counted towards the
totals shown at the end of the test session: "1 passed, 1 failure, etc".

.. note::

    This function is considered **experimental**, so beware that it is subject to changes
    even in patch releases.
TrO   rv   s    r5   count_towards_summary BaseReport.count_towards_summary   s     rM   c                @    U R                   b  U R                   u  pnU$ g)ab  **Experimental** The head line shown with longrepr output for this
report, more commonly during traceback representation during
failures::

    ________ Test.foo ________


In the example above, the head_line is "Test.foo".

.. note::

    This function is considered **experimental**, so beware that it is subject to changes
    even in patch releases.
N)r=   )rI   _fspath_linenodomains       r5   	head_lineBaseReport.head_line   s$      ==$'+}}$GfMrM   c                6   UR                   R                  XS9u  p4n[        U[        5      (       a  XR4$ [        U[        5      (       a@  [        U5      S:X  a1  Uu  pg[        U[        5      (       a  [        U[        5      (       a  Xg4$ [        SU< S35        g )N)reportconfig   zSpytest_report_teststatus() hook (from a plugin) returned an invalid verbose value: z8.
Expected either a string or a tuple of (word, markup).)hookpytest_report_teststatus
isinstancerA   r   lenr   r!   )rI   r   default_markup	_category_shortverbosewordmarkups           r5   _get_verbose_word_with_markup(BaseReport._get_verbose_word_with_markup   s     &,[[%I%I &J &
"	7 gs##**gx((S\Q->"LD$$$FG)D)D|#))0 4,,	
rM   c                    [        U 5      $ )zReturn the contents of this report as a dict of builtin entries,
suitable for serialization.

This was originally the serialize_report() function from xdist (ca03269).

Experimental method.
)_report_to_jsonrv   s    r5   _to_jsonBaseReport._to_json   s     t$$rM   c                (    [        U5      nU " S0 UD6$ )zCreate either a TestReport or CollectReport, depending on the calling class.

It is the callers responsibility to know which class to pass here.

This was originally the serialize_report() function from xdist (ca03269).

Experimental method.
rO   )_report_kwargs_from_json)cls
reportdictkwargss      r5   
_from_jsonBaseReport._from_json   s     **5}V}rM   rO   N)rJ   r
   returnNone)rP   rA   r   r
   rX   r   r   r   )r^   rA   r   zIterator[tuple[str, str]]r   rA   )r   bool)r   r:   )r   r   r   zMapping[str, bool]r   ztuple[str, Mapping[str, bool]])r   dict[str, Any])r   zdict[str, object]r   r&   )__name__
__module____qualname____firstlineno____annotations__rK   r   rQ   rT   ra   propertyrj   rw   r~   r   r   r   r   r   r   r   r   r   classmethodr   __static_attributes__rO   rM   r5   r8   r8   =   s>   
00W $#K33! 3(&
   
 
 
 
 
 
 ( ( ( ( ) ) * * 	 	  (

.@
	'
*% 
 
rM   r8   c                    Sn[        5       n[        SUS9  [        SU  3US9  [        SU 3US9  [        X$S9  [        SU 3US9  [        SUS9  [        UR                  5       5      e)Nz+https://github.com/pytest-dev/pytest/issueszd----------------------------------------------------------------------------------------------------)streamz,INTERNALERROR: Unknown entry type returned: zreport_name: zPlease report this bug at )r   r	   RuntimeErrorre   )	type_namereport_classr   urlr   s        r5   _report_unserialization_failurer      ss     8CZF
9V$
9)EfU
]<.)&9
:%
'u-f=
9V$
v(
))rM   c                    UR                   S:X  a  U R                  U5      nU$ U R                  X R                  R	                  SS5      S9nU$ )Ncalltbstyleauto)style)r;   repr_failure_repr_failure_pyr   	getoption)itemr   excinfor?   s       r5   _format_failed_longreprr     sY     yyF$$W- O ((;;00FC ) 
 OrM   c                   UR                  5       nUc   S5       e[        S UR                  R                   5       5      (       a8  U R	                  5       S S u  p4Uc   e[
        R                  " U5      US-   4nSnO-[        UR                  5      UR                  4nUR                  n/ nUR                  R                   HZ  n[        USS 5      =(       d"    UR                  (       a  UR                  S   OS n	U	(       d  MB  X;  d  MI  UR                  U	5        M\     U(       a  SR                  U5      OUn
/ UQU
P7nU$ )	N=There should always be a traceback entry for skipping a test.c              3  <   #    U  H  n[        US S5      v   M     g7f)_use_item_locationFN)getattr)rp   r"   s     r5   rq   ?_format_exception_group_all_skipped_longrepr.<locals>.<genexpr>  s!      ?Wt*E22?Ws   r      r   msgr   z; )_getreprcrashallvalue
exceptions
reportinfoosr   rA   pathlinenomessager   argsappendru   )r   r   rr   rV   locdefault_msgmsgs	exceptionmreasonr?   s               r5   ,_format_exception_group_all_skipped_longreprr     s)    	A= G=  ?F}}?W?W   __&r*
yyq)166{AHH%ii D]]--	Iud+ 
!*INN1T 	
 1KKN . !%TYYt_+F~f~HOrM   c                      \ rS rSr% SrSrS\S'        S                       SS jjrSS jr\	SS	 j5       r
S
rg)
TestReporti1  zBasic test report object (also used for setup and teardown calls if
they fail).

Reports can contain arbitrary extra attributes.
FrA   wasxfailNc                    Xl         X l        X0l        X@l        XPl        X`l        [        U=(       d    / 5      U l        [        U5      U l        Xl	        Xl
        Xl        U R                  R                  U5        g rF   )rB   r=   keywordsrD   r?   r;   listuser_propertiesr@   durationstartstoprG   rH   )rI   rB   r=   r   rD   r?   r;   r@   r   r   r   r   extras                r5   rK   TestReport.__init__>  sr    (  6> ,4  ! ;?	  $O$9r: X  ( "
	U#rM   c           	         SU R                   R                   SU R                  < SU R                  < SU R                  < S3	$ )N< z when=	 outcome=>)	__class__r   rB   r;   rD   rv   s    r5   __repr__TestReport.__repr__|  s?    4>>**+1T[[O6$))iX\XdXdWgghiirM   c                   UR                   nUS:w  d   eUR                  nUR                  nUR                  nUR                   Vs0 s H  owS_M     nnUR
                  n	/ n
UR
                  (       d  SnSnGOv[        U	[        5      (       d  SnU	nGO[[        U	R                  [        R                  5      (       a  SnU	R                  5       nUc   S5       eU	R                  R                  (       aA  UR                  5       SS u  pUc   e[        R                  " U5      US-   UR                   4nO[#        UR$                  5      UR&                  UR                   4nO[        U	R                  [(        5      (       a`  U	R                  R+                  [        R                  5      S   c3  Sn[-        [        [(        [.        [(        -        U	5      n	[1        X5      nOSn[3        XU	5      nUR4                   H   u  nnnU
R7                  S	U S
U 3U45        M"     U " UR8                  UR:                  UUUUU
UUUUR<                  S9$ s  snf )zsCreate and fill a TestReport with standard item and call info.

:param item: The item.
:param call: The call info.
collectr   r   Nr   r   r   r   z	Captured r  )r   )r;   r   r   r   r   r   r   r   r   r"   	Exceptionr   r   r   r   r   r   rA   r   r   r%   r   r   BaseExceptionr   r   _report_sectionsr   rB   r=   r   )r   r   r   r;   r   r   r   xr   r   r@   rD   r?   r   r   rV   rwhenrP   r`   s                      r5   from_item_and_callTestReport.from_item_and_call  s"    yyy   ==

yy"&--0-QqD-0,,||>FG   g}55""GMM4>>::#))+} S} ==33!%!22A!6JD+++ "		$199EH #AFFQXXqyyAHGMM+=>>##DNN3A6> $!*=;M+MN 	 HV"24wG#'#8#8E3OOyQug6@A $9KKMM 00
 	
[ 1s   I)r   r   r=   r?   rB   rD   r@   r   r   r   r;   )rO   r   r   r   N)rB   rA   r=   ztuple[str, int | None, str]r   zMapping[str, Any]rD   rC   r?   r>   r;   z$Literal['setup', 'call', 'teardown']r@   Iterable[tuple[str, str]]r   floatr   r  r   r  r   z#Iterable[tuple[str, object]] | Noner   r   r   )r   r    r   CallInfo[None]r   r   )r   r   r   r   __doc____test__r   rK   r  r   r  r   rO   rM   r5   r   r   1  s     H M /1?C!<$<$ .<$ $	<$
 8<$<$ 3<$ ,<$ <$ <$ <$  =!<$$ 
%<$|j E
 E
rM   r   c                  d    \ rS rSrSrSr S	           S
S jjr\  SS j5       rSS jr	Sr
g)CollectReporti  zKCollection report object.

Reports can contain arbitrary extra attributes.
r	  c                    Xl         X l        X0l        U=(       d    / U l        [	        U5      U l        U R                  R                  U5        g rF   )rB   rD   r?   resultr   r@   rG   rH   )rI   rB   rD   r?   r  r@   r   s          r5   rK   CollectReport.__init__  sC       ! l XU#rM   c                4    U R                   S U R                   4$ rF   )r   rv   s    r5   r=   CollectReport.location  s     T4;;//rM   c                l    SU R                   < S[        U R                  5       SU R                  < S3$ )Nz<CollectReport z lenresult=r  r  )rB   r   r  rD   rv   s    r5   r  CollectReport.__repr__  s4     {3t{{;K:LIVZVbVbUeefggrM   )r?   rB   rD   r  r@   N)rO   )rB   rA   rD   rC   r?   r>   r  zlist[Item | Collector] | Noner@   r  r   r   )r   r<   r   )r   r   r   r   r  r;   rK   r   r=   r  r   rO   rM   r5   r  r    su    
 D /1$$ 8$	$ .$ ,$ 
$B 0	+0 0
hrM   r  c                  (    \ rS rSrSS jrSS jrSrg)CollectErrorRepri  c                    Xl         g rF   r?   )rI   r   s     r5   rK   CollectErrorRepr.__init__  s    rM   c                8    UR                  U R                  SS9  g )NT)red)rV   r?   )rI   rX   s     r5   rT   CollectErrorRepr.toterminal   s    D)rM   r"  N)r   rA   r   r   r   )r   r   r   r   rK   rT   r   rO   rM   r5   r   r     s    *rM   r   c                    [        U [        [        -  5      (       a+  U R                  5       nU R                  R
                  US'   U$ g )N$report_type)r   r   r  r   r  r   )r   datas     r5   pytest_report_to_serializabler*    s@     &*}455 %//88^rM   c                    SU ;   aU  U S   S:X  a  [         R                  U 5      $ U S   S:X  a  [        R                  U 5      $  SR                  U S   5      5       eg )Nr(  r   r  z(Unknown report_type unserialize data: {})r   r   r  r0   )r)  s    r5   pytest_report_from_serializabler,    so     </((...!_4 ++D11	
@GG 
 	
u rM   c                4  ^^^     SS jmSU4S jjm    SS jmSUU4S jjnU R                   R                  5       n[        U R                  S5      (       a[  [        U R                  S5      (       a'  [        U R                  S5      (       a  U" U 5      US'   O([	        U R                  5      US'   OU R                  US'   U HL  n[        X#   [        R                  5      (       a  [        R                  " X#   5      X#'   M@  US	:X  d  MH  S
X#'   MN     U$ )zReturn the contents of this report as a dict of builtin entries,
suitable for serialization.

This was originally the serialize_report() function from xdist (ca03269).
c                    [         R                  " U 5      nUR                  5        H0  u  p#[        US5      (       d  M  [         R                  " U5      X'   M2     [	        U 5      R
                  US.nU$ )NrG   )typer)  )dataclassesasdictitemsrU   r/  r   )entryr)  rP   r   
entry_datas        r5   serialize_repr_entry-_report_to_json.<locals>.serialize_repr_entry$  sa     !!%(**,JCuj))'..u5	 ' #5k22DA
rM   reprtracebackc                   > [         R                  " U 5      nU R                   Vs/ s H  nT" U5      PM     snUS'   U$ s  snf )Nreprentries)r0  r1  r9  )r7  r  r  r5  s      r5   serialize_repr_traceback1_report_to_json.<locals>.serialize_repr_traceback.  sJ    ##M2-:-F-F!
-F #-F!
} !
s   A 	reprcrashc                6    U b  [         R                  " U 5      $ g rF   )r0  r1  )r<  s    r5   serialize_repr_crash-_report_to_json.<locals>.serialize_repr_crash5  s      %%i00rM   c                n  > U R                   c   e[        [        U R                   5      nT" UR                  5      T" UR                  5      UR
                  S.n[        U[        5      (       a@  / US'   UR                   H)  u  p4nUS   R                  T" U5      T" U5      U45        M+     U$ S US'   U$ )N)r<  r7  r@   chain)
r?   r   r   r<  r7  r@   r   r   rA  r   )repr?   r  repr_traceback
repr_crashdescriptionr>  r:  s         r5   serialize_exception_longrepr5_report_to_json.<locals>.serialize_exception_longrepr=  s    ||'''s||4-h.@.@A5h6L6LM ))"

 h 233 F7O;C>>7Kw&&0@,Z8# <J  #F7OrM   rT   r?   r  N)r3  zReprEntry | ReprEntryNativer   r   )r7  r   r   r   )r<  zReprFileLocation | Noner   dict[str, Any] | None)rB  r8   r   r   )	rG   copyrU   r?   rA   r   r   PathLiker   )r   rF  r2   r_   r>  r5  r:  s       @@@r5   r   r     s    *	*	 . 	Av--6??O44OO[:
 :
 9@AjM0AjM*agr{{++ii(AGXAG	 
 HrM   c                  ^ ^ U 4S jmU4S jnS
S jnT S   (       a  ST S   ;   a  ST S   ;   a  U" T S   S   5      nU" T S   S   5      nT S   S   (       a@  / nT S   S    H&  u  pgnUR                  U" U5      U" U5      U45        M(     [        U5      n	O
[        UUS9n	T S   S	    H  n
U	R                  " U
6   M     U	T S'   T $ )zReturn **kwargs that can be used to construct a TestReport or
CollectReport instance.

This was originally the serialize_report() function from xdist (ca03269).
c                B  > U S   nU S   nUS:X  af  S nS nS nUS   (       a  [        S0 US   D6nUS   (       a  [        S0 US   D6nUS   (       a  [        US   S   5      n[        US   UUUUS   S	9nU$ US
:X  a  [	        US   5      nU$ [        U[        T5        W$ )Nr)  r/  r   reprfuncargsreprfileloc
reprlocalslinesr   )rP  rM  rO  rN  r   r   rO   )r   r   r   r   r   r   r   )r4  r)  
entry_typerM  rN  rO  	reprentryr   s          r5   deserialize_repr_entry8_report_kwargs_from_json.<locals>.deserialize_repr_entrym  s    &!'
$LKJN#+Cd>.BCM".Em1DEL!'\(:7(CD
5>7m)%'7m6I 	 ,,'W6I  ,J
JOrM   c                b   > U S    Vs/ s H  nT" U5      PM     snU S'   [        S0 U D6$ s  snf )Nr9  rO   r   )repr_traceback_dictr  rS  s     r5   deserialize_repr_traceback<_report_kwargs_from_json.<locals>.deserialize_repr_traceback  sD    /B=/Q.
/Q!"1%/Q.
M* 3233.
s   ,c                     U b  [        S0 U D6$ g )NrO   r   )repr_crash_dicts    r5   deserialize_repr_crash8_report_kwargs_from_json.<locals>.deserialize_repr_crash  s    &#6o66rM   r?   r<  r7  rA  )r7  r<  r@   )rZ  rH  )r   r   r   
addsection)r   rW  r[  r7  r<  rA  repr_traceback_datarepr_crash_datarE  exception_infosectionrS  s   `          @r5   r   r   f  s   64 	::j11z*552z"?3
 +:j+A++NO	j!'*EEOFFA#k 23FG.?#F FXFN /+#N
 "*-j9G%%w/ :!/
:rM   )r   rA   r   ztype[BaseReport]r   r   )r   r    r   r  r   zExceptionInfo[BaseException])r   r    r   zEExceptionInfo[BaseExceptionGroup[BaseException | BaseExceptionGroup]]r   ztuple[str, int, str])r   zCollectReport | TestReportr   rH  )r)  r   r   z!CollectReport | TestReport | None)r   r8   r   r   )r   r   r   r   )=
__future__r   collections.abcr   r   r   r   r0  ior   r   r	   systypingr
   r   r   r   r   r   _pytest._code.coder   r   r   r   r   r   r   r   r   r   r   _pytest._ior   _pytest.configr   _pytest.nodesr   r    _pytest.outcomesr!   r"   r)   exceptiongroupr%   typing_extensionsr&   _pytest.runnerr'   r6   r8   r   r   r   r   r  r   r*  r,  r   r   rO   rM   r5   <module>ro     sc   " $ $ # $   	  
        1 , , ( . 0 / + ) , + & ! #  ! ! g1 &'	u up**"2**


$
/K

R BT
 T
n 0hJ 0h 0hf*| *&
&FRPrM   