+
    Spj4                       R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RI	H
t
 ^ RI	Ht ^ RI	Ht ^ R	I	Ht ^ R
It^ R
It^ RIHt ^ RIHt ^ RIHt ^ R
It^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIH t  ^ RI!H"t" ^ RI#H$t$ ^ RI%H&t& ^ RI%H't' ^ RI(H)t) ^ RI(H*t* ^ RI(H+t+ ^ RI,H-t- ^ RI.H/t/ ^ RI.H0t0 ^ RI.H1t1 ^ R I2H3t3 ]'       d   ^ R!I4H5t5 R" R# lt6]Pn                  ! R$R$R$R%7       ! R& R'4      4       t8]Pn                  ! R(R)7       ! R* R+]-4      4       t9]&R, R- l4       t: ! R. R/4      t;]Pn                   ! R0 R14      4       t<]R2 R3 l4       t=]R4 R5 l4       t>]Pn                   ! R6 R74      4       t?]Pn                   ! R8 R94      4       t@R: R; ltAR< R= ltB]3]]C]D3,          ,          ! 4       tER> R? ltF] ! R$R@7      RA RB l4       tGR
# )Cz*Builtin plugin that adds subtests support.)annotations)defaultdict)Callable)Iterator)Mapping)AbstractContextManager)contextmanager)	ExitStack)nullcontextN)TracebackType)Any)TYPE_CHECKING)ExceptionInfo)saferepr)CaptureFixture)	FDCapture)
SysCapture)Config)hookimpl)Parser)check_ispytest)fixture)
SubRequest)catching_logs)LogCaptureHandler)LoggingPlugin)
TestReport)CallInfo)check_interactive_exception)get_reraise_exceptions)StashKey)Selfc                    V ^8  d   QhRRRR/# )   parserr   returnNone )formats   "7/tmp/pip-target-d46v3snk/lib/python/_pytest/subtests.py__annotate__r*   .   s      V      c                T    \         P                  ! V \         P                  R R7       R# )zSpecify verbosity level for subtests. Higher levels will generate output for passed subtests. Failed subtests are always reported.)helpN)r   _add_verbosity_iniVERBOSITY_SUBTESTS)r$   s   &r)   pytest_addoptionr0   .   s"    
!!k	r+   T)frozenslotskw_onlyc                  ^    ] tR t^9t$ RtR]R&   R]R&   R R ltR R	 lt]R
 R l4       t	Rt
R# )SubtestContextzJThe values passed to Subtests.test() that are included in the test report.
str | NonemsgzMapping[str, Any]kwargsc                   V ^8  d   QhRR/# r#   r%   r&   r'   )r(   s   "r)   r*   SubtestContext.__annotate__@   s     
 
t 
r+   c                	    \         P                  T R V P                  P                  4        UUu/ uF  w  rV\	        V4      bK  	  upp4       R# u uppi )r8   N)object__setattr__r8   itemsr   )selfkvs   &  r)   __post_init__SubtestContext.__post_init__@   sB    ($++:K:K:MN:MQ^:MN	
Ns   Ac                   V ^8  d   QhRR/# r#   r%   dict[str, Any]r'   )r(   s   "r)   r*   r;   F   s      . r+   c                	2    \         P                  ! V 4      pV# N)dataclassesasdict)r@   results   & r)   _to_jsonSubtestContext._to_jsonF   s    ##D)r+   c                    V ^8  d   QhRRRR/# )r#   drG   r%   r!   r'   )r(   s   "r)   r*   r;   K   s     5 5> 5d 5r+   c                	2    V ! VR ,          VR,          R7      # )r7   r8   r7   r8   r'   )clsrP   s   &&r)   
_from_jsonSubtestContext._from_jsonJ   s    qx(44r+   r'   N)__name__
__module____qualname____firstlineno____doc____annotations__rC   rM   classmethodrT   __static_attributes__r'   r+   r)   r5   r5   9   s.    T	O
 5 5r+   r5   F)initc                     a  ] tR t^Ot$ R]R&   ]R R l4       tR R ltR V 3R llt]	R	 V 3R
 ll4       t
]	R V 3R ll4       tRtV ;t# )SubtestReportr5   contextc                   V ^8  d   QhRR/# r#   r%   strr'   )r(   s   "r)   r*   SubtestReport.__annotate__T   s     : :3 :r+   c                	J    V P                   w   rV R V P                  4        2# ) )location_sub_test_description)r@   _domains   &  r)   	head_lineSubtestReport.head_lineS   s*    }}14557899r+   c                   V ^8  d   QhRR/# rc   r'   )r(   s   "r)   r*   re   X   s     	0 	0s 	0r+   c                	   . pV P                   P                  e*   VP                  RV P                   P                   R24       V P                   P                  '       dP   RP	                  R V P                   P                  P                  4        4       4      pVP                  RV R24       RP	                  V4      ;'       g    R# )	N[]z, c              3  4   "   T F  w  rV R V 2x  K  	  R# 5i)=Nr'   ).0rA   rB   s   &  r)   	<genexpr>6SubtestReport._sub_test_description.<locals>.<genexpr>]   s       $)Dv1#Qqc
)Ds   ()rg   z(<subtest>))ra   r7   appendr8   joinr?   )r@   partsparams_descs   &  r)   ri   #SubtestReport._sub_test_descriptionX   s    <<'LL1T\\--.a01<<)) $)-)<)<)B)B)D$ K LL1[M+,xx//-/r+   c                   V ^8  d   QhRR/# rF   r'   )r(   s   "r)   r*   re   c   s      . r+   c                	n   < \         SV `  4       pVR  RVR&   V P                  P                  4       VR&   V# )ra   SubTestReport_report_type_subtest.context)superrM   ra   )r@   data	__class__s   & r)   rM   SubtestReport._to_jsonc   s>    w!O.^#'<<#8#8#: r+   c                    V ^8  d   QhRRRR/# )r#   
reportdictrG   r%   r`   r'   )r(   s   "r)   r*   re   k   s      N } r+   c                	h   < \         SV `  V4      p\        P                  VR ,          4      Vn        V# )r   )r   rT   r5   ra   )rS   r   reportr   s   && r)   rT   SubtestReport._from_jsonj   s/    #J/'22:>P3QRr+   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r#   test_reportr   ra   r5   captured_outputzCaptured | Nonecaptured_logszCapturedLogs | Noner%   r!   r'   )r(   s   "r)   r*   re   q   s<         )	
 + 
r+   c                	  < \         SV `  VP                  4       4      pW%n        V'       ds   VP                  '       d(   VP
                  P                  R VP                  34       VP                  '       d(   VP
                  P                  RVP                  34       V'       dJ   VP                  P                  P                  4       ;p'       d   VP
                  P                  RV34       V# )zCaptured stdout callzCaptured stderr callzCaptured log call)r   rT   rM   ra   outsectionsry   errhandlerstreamgetvalue)rS   r   ra   r   r   rL   logr   s   &&&&&  r)   _newSubtestReport._newp   s     #K$8$8$:; """&&(>@S@S'TU"""&&(>@S@S'TU]%:%:%A%A%J%J%LLcLOO""$7#=>r+   r'   )rV   rW   rX   rY   r[   propertyrl   ri   rM   r\   rT   r   r]   __classcell__)r   s   @r)   r`   r`   O   sR    : :	0   
  r+   r`   c                    V ^8  d   QhRRRR/# )r#   requestr   r%   Subtestsr'   )r(   s   "r)   r*   r*      s     V Vj VX Vr+   c                    V P                   P                  P                  P                  R4      pVe   VP                  M\
        p\        V P                   P                  W RR7      # )z Provides subtests functionality.capturemanagerT	_ispytest)nodeconfigpluginmanager
get_pluginglobal_and_fixture_disabledr
   r   ihook)r   capmamsuspend_capture_ctxs   &  r)   subtestsr      sW     \\  ..99:JKF.4.@**k  GLL&&(;PTUUr+   c                  >    ] tR t^tRtRR/R R lltR
R R lltR	tR# )r   z_Subtests fixture, enables declaring subtests inside test functions via the :meth:`test` method.r   Fc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r#   r   pluggy.HookRelayr   *Callable[[], AbstractContextManager[None]]r   r   r   boolr%   r&   r'   )r(   s   "r)   r*   Subtests.__annotate__   s=          H  	    
 r+   c               	@    \        V4       Wn        W n        W0n        R # rI   )r   _ihook_suspend_capture_ctx_request)r@   r   r   r   r   s   &&&&$r)   __init__Subtests.__init__   s     	y!$7!r+   Nc               $    V ^8  d   QhRRRRRR/# )r#   r7   r6   r8   r   r%   _SubTestContextManagerr'   )r(   s   "r)   r*   r      s(      
  
 
  
 
 	 
r+   c           	         \        V P                  VVV P                  V P                  V P                  P                  R7      # )a  
Context manager for subtests, capturing exceptions raised inside the subtest scope and
reporting assertion failures and errors individually.

Usage
-----

.. code-block:: python

    def test(subtests):
        for i in range(5):
            with subtests.test("custom message", i=i):
                assert i % 2 == 0

:param msg:
    If given, the message will be shown in the test report in case of subtest failure.

:param kwargs:
    Arbitrary values that are also added to the subtest report.
)r   r   r   )r   r   r   r   r   )r@   r7   r8   s   &&,r)   testSubtests.test   s;    2 &KKMM $ 9 9==''
 	
r+   )r   r   r   rI   )rV   rW   rX   rY   rZ   r   r   r]   r'   r+   r)   r   r      s    i     
  
r+   r   c                  p    ] tR t^t$ RtR]R&   R]R&   R]R&   R]R	&   R
]R&   R]R&   R R ltR R ltRtR# )r   z
Context manager for subtests, capturing exceptions raised inside the subtest scope and handling
them through the pytest machinery.
r   r   r6   r7   rG   r8   r   r   r   r   r   r   c                   V ^8  d   QhRR/# r:   r'   )r(   s   "r)   r*   #_SubTestContextManager.__annotate__   s     
 
4 
r+   c                	j   R p\         P                   ! 4       V n        \         P                  ! 4       V n        RV n        \        4       V n        V P                  P                  \        V P                  4      4      V n
        V P                  P                  \        V P                  4      4      V n        R# )TN)time_startperf_counter_precise_start	_exc_infor	   _exit_stackenter_contextcapturing_outputr   _captured_outputcapturing_logs_captured_logs)r@   __tracebackhide__s   & r)   	__enter__ _SubTestContextManager.__enter__   s     iik"//1$; $ 0 0 > >T\\*!
 #..<<4<<(
r+   c               (    V ^8  d   QhRRRRRRRR/# )	r#   exc_typeztype[BaseException] | Noneexc_valzBaseException | Noneexc_tbzTracebackType | Noner%   r   r'   )r(   s   "r)   r*   r      s2     6 6,6 &6 %	6
 
6r+   c           
     	   R pVe   \         P                  ! V4      pMRpV P                  P                  4        \        P
                  ! 4       pW`P                  ,
          p\        P                  ! 4       p\        R,          ! RVV P                  VVRR R7      p	V P                  P                  V P                  P                  V	R7      p
\        P                  V
\        V P                   V P"                  R7      V P$                  V P&                  R7      pVP(                  '       dT   V P*                  P,                  \.        ,          pWP                  P                  P0                  ;;,          ^,          uu&   V P3                  4       ;_uu_ 4        V P                  P5                  VR7       RRR4       \7        W4      '       d2   V P                  P9                  V P                  P                  WR7       VeP   \;        V\=        V P*                  4      4      '       d   R	# V P                  P>                  P@                  '       d   R	# R #   + '       g   i     L; i)
TNcall)startstopdurationwhenr   )itemr   rR   )r   r   r   )r   r   r   F)!r   from_exceptionr   closer   r   r   r   r   r   pytest_runtest_makereportr   r   r`   r   r5   r7   r8   r   r   failedr   stashfailed_subtests_keynodeidr   pytest_runtest_logreportr   pytest_exception_interact
isinstancer   session
shouldfail)r@   r   r   r   r   exc_infoprecise_stopr   r   	call_infor   
sub_reportfailed_subtestss   &&&&         r)   __exit___SubTestContextManager.__exit__   s    !$33G<HH ((*"5"55yy{TN++
	 55"" 6 
 #''txx< 11--	 ( 

 "kk//0CDOLL--445:5%%''JJ//z/B ( 'y==JJ00\\&&Y 1  '#9$++#FGG||##... ('s   II 	)r   r   r   r   r   r   N)	rV   rW   rX   rY   rZ   r[   r   r   r]   r'   r+   r)   r   r      s:     	OCCN
6 6r+   r   c                    V ^8  d   QhRRRR/# )r#   r   r   r%   zIterator[Captured]r'   )r(   s   "r)   r*   r*      s      j -? r+   c              #  P  "   V P                   P                  R R4      pV P                   P                  P                  R4      p\	        VRR4      '       d   RpM6VR8X  d   \        \        V RR7      pMVR8X  d   \        \        V RR7      pMRpVe   VP                  ! 4        \        4       p Vx  Ve3   VP                  ! 4       w  rVVP                  ! 4        WTn        Wdn        R# R#   Te2   TP                  ! 4       w  rVTP                  ! 4        YTn        Ydn        i i ; i5i)captureNr   _capture_fixturesysTr   fd)r   	getoptionr   	getplugingetattrr   r   r   r   Captured
readouterrr   r   r   )r   optioncapmanr   capturedr   r   s   &      r)   r   r     s     ^^%%i6F^^))334DEFv)400	5 WE	4 GtDzH))+HCMMOLL	 7))+HCMMOLL	 s   B-D&0C, 48D&,7D##D&c                    V ^8  d   QhRRRR/# )r#   r   r   r%   zIterator[CapturedLogs | None]r'   )r(   s   "r)   r*   r*   =  s         " r+   c              #  J  "   V P                   P                  P                  R 4      pVf   Rx  R# \        4       pVP	                  VP
                  4       \        V4      p\        W!P                  R7      ;_uu_ 4        Vx  RRR4       R#   + '       g   i     R# ; i5i)zlogging-pluginN)level)	r   r   r   r   setFormatter	formatterCapturedLogsr   	log_level)r   logging_pluginr   r   s   &   r)   r   r   <  s}      ,3>>+G+G+Q+Q,N 
#%^556$W-7*B*BCC DCCCs   A>B# B
B#B 		B#c                  4    ] tR tRt$ RtR]R&   RtR]R&   RtR# )r   iN   rd   r   r   r'   N)rV   rW   rX   rY   r   r[   r   r]   r'   r+   r)   r   r   N  s    CMCMr+   r   c                  "    ] tR tRt$ R]R&   RtR# )r  iT  r   r   r'   N)rV   rW   rX   rY   r[   r]   r'   r+   r)   r  r  T  s    r+   r  c                    V ^8  d   QhRRRR/# )r#   r   r   r%   zdict[str, Any] | Noner'   )r(   s   "r)   r*   r*   Y  s      * 9N r+   c                R    \        V \        4      '       d   V P                  4       # R # rI   )r   r`   rM   r   s   &r)   pytest_report_to_serializabler	  Y  s    &-((  r+   c                    V ^8  d   QhRRRR/# )r#   r   rG   r%   zSubtestReport | Noner'   )r(   s   "r)   r*   r*   _  s      . =Q r+   c                \    V P                  R 4      R8X  d   \        P                  V 4      # R# )r   r   N)getr`   rT   )r   s   &r)   pytest_report_from_serializabler  _  s'    xx?2''--r+   c                    V ^8  d   QhRRRR/# )r#   r   r   r%   r&   r'   )r(   s   "r)   r*   r*   j  s     9 9V 9 9r+   c                F    \        \        4      V P                  \        &   R # rI   )r   intr   r   )r   s   &r)   pytest_configurer  j  s    (3C(8FLL$%r+   )tryfirstc               $    V ^8  d   QhRRRRRR/# )r#   r   r   r   r   r%   z0tuple[str, str, str | Mapping[str, bool]] | Noner'   )r(   s   "r)   r*   r*   o  s&     3 333 63r+   c                   V P                   R 8w  d   R# VP                  \        P                  4      ^ 8H  p\	        V \
        4      '       d   V P                  pV P                  4       p\        V R4      '       d#   V'       d   R# VR8X  d   RpRpRpMR# WVV V 23# V P                  '       d	   VRR	V 23# V P                  '       d   V'       d   R# R
V 2RRV 23# V P                  '       d   V'       d   R# VRRV 23#  R# VP                  \        ,          V P                  ,          pV P                  '       d'   V^ 8  d    RV n        V^8  d   RMRp	RV RV	 2V n        R# )r   Nwasxfailr  skippedxfailedySUBXFAILu	SUBFAILEDz	subtests 	SUBPASSED-
SUBSKIPPEDr   sz	contains z failed subtest)r  r  r  )r   get_verbosityr   r/   r   r`   outcomeri   hasattrr   passedr  r   r   r   longrepr)
r   r   quietr!  descriptioncategoryshortstatusfailed_subtests_countsuffixs
   &&        r)   pytest_report_teststatusr,  n  sm   
 {{f  !:!:;q@E&-((..2246:&&!!I%$# vh{m$<<<===C9[M!:::}}}%%&wi0#;-7PPP%%"C:k])CCC	    !'-@ A&-- P===2Q6%FN1A5S2F )*?)@PVxXFOr+   )HrZ   
__future__r   collectionsr   collections.abcr   r   r   
contextlibr   r   r	   r
   rJ   r   typesr   typingr   r   pluggy_pytest._coder   _pytest._io.safereprr   _pytest.capturer   r   r   _pytest.configr   r   _pytest.config.argparsingr   _pytest.deprecatedr   _pytest.fixturesr   r   _pytest.loggingr   r   r   _pytest.reportsr   _pytest.runnerr   r   r   _pytest.stashr    typing_extensionsr!   r0   	dataclassr5   r`   r   r   r   r   r   r   r  r	  r  rd   r  r   r  r,  r'   r+   r)   <module>rA     s   0 " # $ $ # - %   "        ' ) * % & ! # , - $ ' ) - ) & # 6 1 " & d$=5 5 >5* E"4J 4 #4n 	V 	V0
 0
f W W Wt  8    "   
    {38457 9 
43 3r+   