+
    -jc                      a  0 t $ R 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t^ RIt^ RIt^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RI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.H0t0 ^ RI1H2t2 ^ RI3H4t4 ^ RI5H6t6 ^ RI7H8t8 ]'       d   ^ RI9t9^ RI:H;t; Rt<Rt=R t>R!t?R"t@]<]=]>]?]@3tARsBRsCR#]DR$&   R% R& ltER' R( ltFR) R* ltGR+ R, ltHR- R. ltIR/ R0 ltJ ! R1 R2]4      tK ! R3 R4]L4      tMR5 R6 ltNR[R7 R8 lltO ! R9 R:]-4      tPR; R< ltQR= R> ltRR? R@ ltS ! RA RB]44      tTRC RD ltURE RF ltV]RG RH l4       tW ! RI RJ]44      tXRK RL ltYRM RN ltZRO RP lt[RQ RR lt\RS RT lt]RU RV lt^])! RWRX7      RY RZ l4       t_R# )\z4Discover and run doctests in modules and test files.)annotationsN)Callable)	Generator)Iterable)Sequence)contextmanager)Path)Any)TYPE_CHECKING)outcomes)ExceptionInfo)ReprFileLocation)TerminalRepr)TerminalWritersafe_getattr)Config)Parser)fixture)
TopRequest)	Collector)Item)OutcomeException)skip
fnmatch_ex)Module)approx)PytestWarning)Selfnonecdiffndiffudiffonly_first_failurez"type[doctest.OutputChecker] | NoneCHECKER_CLASSc                    V ^8  d   QhRRRR/# )   parserr   returnNone )formats   "d/Users/mitch_tango/dev/rabbit-r1-livekit/agent/.venv/lib/python3.14/site-packages/_pytest/doctest.py__annotate__r.   F   s     / /V / /    c           	        V P                  R RRR.R7       V P                  RRRR7       V P                  R	4      pVP                  R
RRRRR7       VP                  R\        P                  RR\
        RR7       VP                  RR. RRRR7       VP                  RRRRRR7       VP                  RRRRR R7       R!# )"doctest_optionflagszOption flags for doctestsargsELLIPSIS)typedefaultdoctest_encodingzEncoding used for doctest fileszutf-8)r5   collectz--doctest-modules
store_trueFzRun doctests in all .py modulesdoctestmodules)actionr5   helpdestz--doctest-reportr#   z9Choose another output format for diffs on doctest failuredoctestreport)r4   r5   r;   choicesr<   z--doctest-globappendpatz2Doctests file matching pattern, default: test*.txtdoctestglob)r:   r5   metavarr;   r<   z--doctest-ignore-import-errorsz Ignore doctest collection errorsdoctest_ignore_import_errorsz--doctest-continue-on-failurez<For a given doctest, continue to run after the first failuredoctest_continue_on_failureN)addinigetgroup	addoptionstrlowerDOCTEST_REPORT_CHOICES)r(   groups   & r-   pytest_addoptionrL   F   s    
MM#	   MM=w   OOI&E	OO.   
OOYYH&   
OOA   
OO(/+   
OO'K*  r/   c                   V ^8  d   QhRR/# r'   r)   r*   r+   )r,   s   "r-   r.   r.   x   s      D r/   c                 
    R s R # N)RUNNER_CLASSr+   r/   r-   pytest_unconfigurerR   x   s	     Lr/   c               $    V ^8  d   QhRRRRRR/# )r'   	file_pathr   parentr   r)   z&DoctestModule | DoctestTextfile | Noner+   )r,   s   "r-   r.   r.   ~   s&       ,r/   c                B   VP                   pV P                  R 8X  dZ   VP                  P                  '       d<   \	        \        V 4      \        V 4      34      '       g   \        P                  WR7      # R# \        W V4      '       d   \        P                  WR7      # R# )z.pypathN)configsuffixoptionr9   any_is_setup_py_is_main_pyDoctestModulefrom_parent_is_doctestDoctestTextfile)rT   rU   rY   s   && r-   pytest_collect_filerc   ~   s     ]]F5 ==''')$k)&<=1
 1
 !,,V,DD  
V	/	/**6*BBr/   c                    V ^8  d   QhRRRR/# r'   rX   r   r)   boolr+   )r,   s   "r-   r.   r.      s     A At A Ar/   c                l    V P                   R 8w  d   R# V P                  4       pRV9   ;'       g    RV9   # )zsetup.pyFs
   setuptoolss	   distutils)name
read_bytes)rX   contentss   & r-   r]   r]      s5    yyJ HH$@@(@@r/   c               (    V ^8  d   QhRRRRRRRR/# )	r'   rY   r   rX   r   rU   r   r)   rf   r+   )r,   s   "r-   r.   r.      s(     9 9 9d 9I 9$ 9r/   c                  a SP                   R9   d$   VP                  P                  S4      '       d   R# V P                  R4      ;'       g    R.p\        ;QJ d    V3R lV 4       F  '       g   K   R# 	  R# ! V3R lV 4       4      # ).txtTrA   z	test*.txtc              3  <   <"   T F  p\        VS4      x  K  	  R # 5irP   r   ).0globrX   s   & r-   	<genexpr>_is_doctest.<locals>.<genexpr>   s     8%$z$%%%s   F)rm   z.rst)rZ   session
isinitpath	getoptionr\   )rY   rX   rU   globss   &f& r-   ra   ra      sj    {{&&6>>+D+DT+J+J]+<<}E38%83383838%888r/   c                    V ^8  d   QhRRRR/# re   r+   )r,   s   "r-   r.   r.      s     & &d &t &r/   c                     V P                   R 8H  # )z__main__.py)rh   rW   s   &r-   r^   r^      s    99%%r/   c                  .    ] tR t^tR R ltR R ltRtR# )ReprFailDoctestc                    V ^8  d   QhRRRR/# )r'   reprlocation_linesz0Sequence[tuple[ReprFileLocation, Sequence[str]]]r)   r*   r+   )r,   s   "r-   r.   ReprFailDoctest.__annotate__   s     5 5"R5	5r/   c                	    Wn         R # rP   r|   )selfr|   s   &&r-   __init__ReprFailDoctest.__init__   s
     #5r/   c                    V ^8  d   QhRRRR/# )r'   twr   r)   r*   r+   )r,   s   "r-   r.   r}      s     ( (^ ( (r/   c                	    V P                    F0  w  r#V F  pVP                  V4       K  	  VP                  V4       K2  	  R # rP   )r|   line
toterminal)r   r   reprlocationlinesr   s   &&   r-   r   ReprFailDoctest.toterminal   s8    #'#:#:L ##B' $;r/   r   N)__name__
__module____qualname____firstlineno__r   r   __static_attributes__r+   r/   r-   rz   rz      s    5
( (r/   rz   c                  .   a  ] tR t^tR V 3R lltRtV ;t# )MultipleDoctestFailuresc                    V ^8  d   QhRRRR/# )r'   failuresz Sequence[doctest.DocTestFailure]r)   r*   r+   )r,   s   "r-   r.   $MultipleDoctestFailures.__annotate__   s     ! !!A !d !r/   c                	0   < \         SV `  4        Wn        R # rP   )superr   r   )r   r   	__class__s   &&r-   r    MultipleDoctestFailures.__init__   s     r/   )r   )r   r   r   r   r   r   __classcell__r   s   @r-   r   r      s    ! !r/   r   c                   V ^8  d   QhRR/# )r'   r)   ztype[doctest.DocTestRunner]r+   )r,   s   "r-   r.   r.      s     2 27 2r/   c                 @   a ^ RI o ! V3R lRSP                  4      p V # )    Nc                  \   <a  ] tR t^tRtR	R V 3R llltR V3R lltR V3R lltRtV ;t	# )
/_init_runner_class.<locals>.PytestDoctestRunnerzpRunner to collect failures.

Note that the out variable in this case is a list instead of a
stdout-like object.
c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r'   checkerdoctest.OutputChecker | Noneverbosebool | Noneoptionflagsintcontinue_on_failurerf   r)   r*   r+   )r,   s   "r-   r.   <_init_runner_class.<locals>.PytestDoctestRunner.__annotate__   s<     	; 	;1	; !	; 		;
 "&	; 	;r/   c                	6   < \         SV `  WVR 7       W@n        R# ))r   r   r   N)r   r   r   )r   r   r   r   r   r   s   &&&&&r-   r   8_init_runner_class.<locals>.PytestDoctestRunner.__init__   s     GW;W':$r/   c               (    V ^8  d   QhRRRRRRRR/# )	r'   testdoctest.DocTestexampledoctest.ExamplegotrH   r)   r*   r+   )r,   s   "r-   r.   r      s4     	 	 "	 %		
 	 	r/   c                	x   < SP                   ! W#V4      pV P                  '       d   VP                  V4       R # VhrP   )DocTestFailurer   r?   )r   outr   r   r   failuredoctests   &&&&& r-   report_failure>_init_runner_class.<locals>.PytestDoctestRunner.report_failure   s4     ,,TC@G'''

7#r/   c               (    V ^8  d   QhRRRRRRRR/# )	r'   r   r   r   r   exc_infoz>tuple[type[BaseException], BaseException, types.TracebackType]r)   r*   r+   )r,   s   "r-   r.   r      s5     	 	 "	 %		
 U	 	r/   c                	>  < \        V^,          \        4      '       d
   V^,          h\        V^,          \        P                  4      '       d   \        P
                  ! R4       SP                  ! W#V4      pV P                  '       d   VP                  V4       R# Vh)   zQuitting debuggerN)	
isinstancer   bdbBdbQuitr   exitUnexpectedExceptionr   r?   )r   r   r   r   r   r   r   s   &&&&& r-   report_unexpected_exceptionK_init_runner_class.<locals>.PytestDoctestRunner.report_unexpected_exception   sr     (1+'788qk!(1+s{{331211$JG'''

7#r/   )r   NNr   T)
r   r   r   r   __doc__r   r   r   r   r   )r   r   s   @r-   PytestDoctestRunnerr      s&    		; 	;	 		 	r/   r   )r   DebugRunner)r   r   s    @r-   _init_runner_classr      s!    -g11 -^ r/   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r'   r   r   r   r   r   r   r   rf   r)   doctest.DocTestRunnerr+   )r,   s   "r-   r.   r.      s:      )  	
 r/   c                D    \         f   \        4       s \        V VVVR7      # )Nr   r   r   r   )rQ   r   r   s   &&&&r-   _get_runnerr      s-     )+ /	 r/   c                     a  ] tR t^tR V 3R llt]R V 3R ll4       tR R ltR R ltR	 R
 lt	R R lt
R V 3R lltR R ltRtV ;t# )DoctestItemc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r'   rh   rH   rU   DoctestTextfile | DoctestModulerunnerr   dtestr   r)   r*   r+   )r,   s   "r-   r.   DoctestItem.__annotate__   s<       0 &	
  
r/   c                	   < \         SV `  W4       W0n        W@n        R V n        V P
                  P                  pVP                  V R R R7      pW`n        VP                  V n
        V P                  4        R # )N)nodefunccls)r   r   r   r   objrs   _fixturemanagergetfixtureinfo_fixtureinfonames_closurefixturenames_initrequest)r   rh   rU   r   r   fmfixtureinfor   s   &&&&&  r-   r   DoctestItem.__init__   sk     	&
 \\))''T$'G''55r/   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r'   rU   r   rh   rH   r   r   r   r   r)   r   r+   )r,   s   "r-   r.   r     sC     
Y 
Y/
Y 	
Y
 &
Y 
Y 

Yr/   c               &   < \         SV `  W!W4R7      # )zThe public named constructor.)rh   rU   r   r   )r   r`   )r   rU   rh   r   r   r   s   &&$$$r-   r`   DoctestItem.from_parent  s     w"F"XXr/   c                   V ^8  d   QhRR/# rN   r+   )r,   s   "r-   r.   r     s     9 9d 9r/   c                	8    / V n         \        V R R7      V n        R# )T)	_ispytestN)funcargsr   _requestr   s   &r-   r   DoctestItem._initrequest  s    +-"448r/   c                   V ^8  d   QhRR/# rN   r+   )r,   s   "r-   r.   r      s     ' 't 'r/   c                	0   V P                   P                  4        \        V P                   P                  R 7      pV P                   P                  R4      P	                  4        F	  w  r#W1V&   K  	  V P
                  P                  P                  V4       R# ))
getfixturedoctest_namespaceN)r   _fillfixturesdictgetfixturevalueitemsr   rv   update)r   rv   rh   values   &   r-   setupDoctestItem.setup   sk    ##% = =>==889LMSSUKD$K V

&r/   c                   V ^8  d   QhRR/# rN   r+   )r,   s   "r-   r.   r   '  s     4 4 4r/   c                	    \        V P                  4       V P                  4        . pV P                  P	                  V P                  VR 7       V'       d   \        V4      hR# ))r   N)_check_all_skippedr   $_disable_output_capturing_for_darwinr   runr   )r   r   s   & r-   runtestDoctestItem.runtest'  sL    4::&11313 	

1)(33 r/   c                   V ^8  d   QhRR/# rN   r+   )r,   s   "r-   r.   r   1  s     	" 	"d 	"r/   c                `   \         P                  ! 4       R8w  d   R# V P                  P                  P	                  R4      pV'       de   VP                  RR7       VP                  4       w  r#\        P                  P                  V4       \        P                  P                  V4       R# R# )zFDisable output capturing. Otherwise, stdout is lost to doctest (#985).DarwinNcapturemanagerT)in_)platformsystemrY   pluginmanager	getpluginsuspend_global_captureread_global_capturesysstdoutwritestderr)r   capmanr   errs   &   r-   r   0DoctestItem._disable_output_capturing_for_darwin1  s|    ??(**445EF))d)3113HCJJS!JJS!	 r/   c                    V ^8  d   QhRRRR/# )r'   excinfozExceptionInfo[BaseException]r)   zstr | TerminalReprr+   )r,   s   "r-   r.   r   =  s     >3 >3->3 
>3r/   c                	x  < ^ RI pRp\        VP                  VP                  VP                  ,          4      '       d   VP                  .pM6\        VP                  \
        4      '       d   VP                  P                  pVf   \        SV `!  V4      # . pV EF  pVP                  pVP                  pVP                  pVP                  f   Rp	M$VP                  VP                  ,           ^,           p	\        V4      P                  p
\        WV
4      p\!        4       p\#        V P$                  P'                  R4      4      pV	e   VP                  P(                  f   Q hVP                  P(                  P+                  R4      pVP                  f   Q h\-        V4       UUu. uF%  w  ppWP                  ,           ^,           R RV 2NK'  	  pppV\/        VP                  ^	,
          ^ 4      VP                  ^,            pM?R.pRpVP0                  P+                  4        F  pVP3                  RV RV 24       R	pK  	  \        WRP                  4      '       d3   WP5                  WeP6                  V4      P9                  R
4      ,          pM|\:        P<                  ! VP>                  4      pVRVP                  : 2.,          pT\@        PB                  ! VP>                  !   Uu. uF  pVPE                  R
4      NK  	  up,          pVP3                  W34       EK  	  \G        V4      # u uppi u upi )r   Nr=   F03d z?EXAMPLE LOCATION UNKNOWN, not showing all tests of that examplez>>>z??? z...
zUNEXPECTED EXCEPTION: )$r   r   r   r   r   r   r   r   repr_failurer   r   filenamelinenor4   r   r   _get_checker_get_report_choicerY   ru   	docstring
splitlines	enumeratemaxsourcer?   output_differencer   splitr   from_exc_infor   	tracebackformat_exceptionstriprz   )r   r  r   r   r|   r   r   r   r  r  messager   r   report_choicer   ixindentr   inner_excinfor   s   &&                  r-   r  DoctestItem.repr_failure=  s    	  	 MM711G4O4OO
 
  H'>??}}--H7'00GooG<<D}}H{{"w~~597m,,G+HgFL"nG.t{{/D/D_/UVM!||--999..99%@{{...CLUCSCS!Qq;;*3/q4CS   c'..1"4a87>>A;MN V #NN557DLL4xq!78"F 8 '#9#9::22[[-%+ !. ; ;G<L<L M2=3F3F2IJKK+4+E+EwGWGW+X+XaAGGDM+X  %%|&;<S  T 1221(s   '+L1,L7c                   V ^8  d   QhRR/# )r'   r)   z.tuple[os.PathLike[str] | str, int | None, str]r+   )r,   s   "r-   r.   r   }  s     F FJ Fr/   c                	b    V P                   V P                  P                  R V P                   23# )z
[doctest] )rX   r   r  rh   r   s   &r-   
reportinfoDoctestItem.reportinfo}  s(    yy$**++z$))-EEEr/   )r   r   r   r   r   r   r   )r   r   r   r   r   classmethodr`   r   r   r   r   r  r0  r   r   r   s   @r-   r   r      sN     & 
Y 
Y9'4	">3 >3@F Fr/   r   c                   V ^8  d   QhRR/# )r'   r)   zdict[str, int]r+   )r,   s   "r-   r.   r.     s      . r/   c                     ^ RI p \        V P                  V P                  V P                  V P
                  V P                  V P                  \        4       \        4       \        4       R7	      # )r   N)	DONT_ACCEPT_TRUE_FOR_1DONT_ACCEPT_BLANKLINENORMALIZE_WHITESPACEr3   IGNORE_EXCEPTION_DETAILCOMPARISON_FLAGSALLOW_UNICODEALLOW_BYTESNUMBER)r   r   r5  r6  r7  r3   r8  r9  _get_allow_unicode_flag_get_allow_bytes_flag_get_number_flagr   s    r-   _get_flag_lookuprA    sZ    &==%;;$99!! ' ? ? 11-/)+!
 
r/   c                    V ^8  d   QhRRRR/# )r'   rY   r   r)   r   r+   )r,   s   "r-   r.   r.     s      F s r/   c                p    V P                  R 4      p\        4       p^ pV F  pW2V,          ,          pK  	  V# )r1   )getinirA  )rY   optionflags_strflag_lookup_tableflag_accflags   &    r-   get_optionflagsrI    s;    mm$9:O(*Hd++  Or/   c                    V ^8  d   QhRRRR/# )r'   rY   r   r)   rf   r+   )r,   s   "r-   r.   r.     s      V  r/   c                j    V P                  R 4      pV'       d   V P                  R4      '       d   RpV# )rD   usepdbF)getvalue)rY   r   s   & r-   _get_continue_on_failurerN    s2     &0M N ??8$$"'r/   c                  &    ] tR tRtRtR R ltRtR# )rb   i  Nc                   V ^8  d   QhRR/# r'   r)   zIterable[DoctestItem]r+   )r,   s   "r-   r.   DoctestTextfile.__annotate__  s      . r/   c              #  	  "   ^ RI pV P                  P                  R4      pV P                  P	                  V4      p\        V P                  4      pV P                  P                  pRR/p\        V P                  4      p\        RV\        4       \        V P                  4      R7      pVP                  ! 4       p	V	P                  W6WT^ 4      p
V
P                  '       d&   \        P                  W
P                  WR7      x  R# R# 5i)r   Nr6   r   __main__Fr   r   r   r   rh   r   r   )r   rY   rD  rX   	read_textrH   rh   rI  r   r  rN  DocTestParserget_doctestexamplesr   r`   )r   r   encodingtextr  rh   rv   r   r   r(   r   s   &          r-   r7   DoctestTextfile.collect  s      ;;%%&89yy""8,tyy>yy~~Z(%dkk2# N 8 E	
 &&(!!$tqA===))99V *   s   DDr+   )r   r   r   r   r   r7   r   r+   r/   r-   rb   rb     s    
C r/   rb   c                    V ^8  d   QhRRRR/# )r'   r   r   r)   r*   r+   )r,   s   "r-   r.   r.     s     2 2_ 2 2r/   c                   a ^ RI o\        ;QJ d)    V3R lV P                   4       F  '       d   K   RM	  RM! V3R lV P                   4       4      pV'       d   \        R4       R# R# )zRRaise pytest.skip() if all examples in the given DocTest have the SKIP
option set.Nc              3  n   <"   T F*  qP                   P                  SP                  R 4      x  K,  	  R# 5i)FN)optionsgetSKIP)ro   r*  r   s   & r-   rq   %_check_all_skipped.<locals>.<genexpr>  s%     P-QiimmGLL%88-s   25FTz!all tests skipped by +SKIP option)r   allrZ  r   )r   all_skippedr   s   & @r-   r   r     sA     #P$--P###P$--PPK01 r/   c                    V ^8  d   QhRRRR/# )r'   r   objectr)   rf   r+   )r,   s   "r-   r.   r.     s      F t r/   c                     \        V RR4      RJ# )ziReturn if an object is possibly a mock object by checking the
existence of a highly improbable attribute.1pytest_mock_example_attribute_that_shouldnt_existNr   )r   s   &r-   
_is_mockedrk    s     	SMtT	r/   c                   V ^8  d   QhRR/# )r'   r)   zGenerator[None]r+   )r,   s   "r-   r.   r.     s     % %/ %r/   c               #     a"   \         P                  oRR/R V3R lllp V \         n         Rx  S\         n        R#   S\         n        i ; i5i)z|Context manager which replaces ``inspect.unwrap`` with a version
that's aware of mock objects and doesn't recurse into them.stopNc               $    V ^8  d   QhRRRRRR/# )r'   r   zCallable[..., Any]rn  zCallable[[Any], Any] | Noner)   r	   r+   )r,   s   "r-   r.   ._patch_unwrap_mock_aware.<locals>.__annotate__  s$       +F	r/   c                  <a a  Ve   V\         J d   S! S \         R7      # VoS! S VV 3R lR7      #   \         d+   p\        P                  ! RT: RS : R2\        4       h R p?ii ; i)N)rn  c                :   < \        V 4      ;'       g	    S! S4      # rP   )rk  )r   _stopr   s   &r-   <lambda>F_patch_unwrap_mock_aware.<locals>._mock_aware_unwrap.<locals>.<lambda>  s    jo6T6Tt6Tr/   zGot z when unwrapping z.  This is usually caused by a violation of Python's object protocol; see e.g. https://github.com/pytest-dev/pytest/issues/5080)rk  	Exceptionwarningswarnr   )r   rn  ers  real_unwraps   f$ @r-   _mock_aware_unwrap4_patch_unwrap_mock_aware.<locals>._mock_aware_unwrap  st    	|tz1"4j99Et*TUU 	MMqe,TH 5C C 	 	s   2 2 2 A'%A""A')inspectunwrap)r{  rz  s    @r-   _patch_unwrap_mock_awarer    sB      ..KIM " (GN%$s   )A> AAAc                  "    ] tR tRtR R ltRtR# )r_   i  c                   V ^8  d   QhRR/# rQ  r+   )r,   s   "r-   r.   DoctestModule.__annotate__  s     H H. Hr/   c              #  	  "   ^ RI p ! R RVP                  4      p V P                  pT P                  P                  P                  T 4       T! 4       p\        T P
                  4      p\        RT\        4       \        T P
                  4      R7      pTP!                  XTP"                  4       F:  pTP$                  '       g   K  \&        P)                  YP*                  YgR7      x  K<  	  R#   \        P                   d@    T P
                  P                  R4      '       d   \        RT P                  : 24        ELh i ; i5i)	r   Nc                  Z  a  ] tR tRt]P
                  R,          t]R8  ;'       gU    ]R8H  ;'       d"    ]P
                  P                  ^	8  ;'       g'    ]R8H  ;'       d    ]P
                  P                  ^8  t]'       d   V 3R lt	]P
                  R8  d   V 3R lt
RtV ;t# RtV ;t# )	5DoctestModule.collect.<locals>.MockAwareDocTestFinderi  :Nr'   Nc                   < \        V\        4      '       d   \        VRV4      p\        VR4      '       d   \        P
                  ! V4      p\        SV `  VV4      # )zOn older Pythons, doctest code does not take into account
`@property`. https://github.com/python/cpython/issues/61648

Moreover, wrapped Doctests need to be unwrapped so the correct
line number is returned. #8796
fget__wrapped__)r   propertygetattrhasattrr}  r~  r   _find_lineno)r   r   source_linesr   s   &&&r-   r  BDoctestModule.collect.<locals>.MockAwareDocTestFinder._find_lineno  sU     "#x00%c637sM22%nnS1 !7/$ r/   c                z   < \        V\        P                  4      '       d   VP                  p\        SV `  W4      # )z`cached_property` objects are never considered a part
of the 'current module'. As such they are skipped by doctest.
Here we override `_from_module` to check the underlying
function instead. https://github.com/python/cpython/issues/107995
)r   	functoolscached_propertyr   r   _from_module)r   modulerh  r   s   &&&r-   r  BDoctestModule.collect.<locals>.MockAwareDocTestFinder._from_module  s3     "&)*C*CDD!' !7/??r/   r+   )      )r     )r     )r   r   r   r   r
  version_infopy_ver_info_minormicrois_find_lineno_brokenr  r  r   r   r   s   @r-   MockAwareDocTestFinderr    s     # 0 0 4!G+ Q Q%0OOS5E5E5K5Ka5OQ Q%0OOS5E5E5K5Ka5O "
 %( ')
@ 
@ *r/   r  rC   zunable to import module FrU  rV  )r   DocTestFinderr   r   CollectErrorrY   rM  r   rX   rs   r   parsefactoriesrI  r   r  rN  findr   rZ  r   r`   rh   )r   r   r  r  finderr   r   r   s   &       r-   r7   DoctestModule.collect  s    )	@W%:%: )	@V	XXF 	$$33D9 ()%dkk2# N 8 E	
 KK8D}}}!--yy .   9) %% 	{{##$BCC/		}=>		s4   EC0 BE)E05E&E?EEEr+   N)r   r   r   r   r7   r   r+   r/   r-   r_   r_     s    H Hr/   r_   c                   V ^8  d   QhRR/# )r'   r)   ztype[doctest.OutputChecker]r+   )r,   s   "r-   r.   r.   @  s     T! T!8 T!r/   c                 8    ^ RI p  ! R RV P                  4      pV# )r   Nc                     a  ] tR tRt]P
                  ! R]P                  4      t]P
                  ! R]P                  4      t]P
                  ! R]P                  4      t
R V 3R lltR R ltR	tV ;t# )
2_init_checker_class.<locals>.LiteralsOutputCheckeriC  z(\W|^)[uU]([rR]?[\'\"])z(\W|^)[bB]([rR]?[\'\"])a  
            (?P<number>
              (?P<mantissa>
                (?P<integer1> [+-]?\d*)\.(?P<fraction>\d+)
                |
                (?P<integer2> [+-]?\d+)\.
              )
              (?:
                [Ee]
                (?P<exponent1> [+-]?\d+)
              )?
              |
              (?P<integer3> [+-]?\d+)
              (?:
                [Ee]
                (?P<exponent2> [+-]?\d+)
              )
            )
            c               (    V ^8  d   QhRRRRRRRR/# )r'   wantrH   r   r   r   r)   rf   r+   )r,   s   "r-   r.   ?_init_checker_class.<locals>.LiteralsOutputChecker.__annotate__a  s.     	@ 	@S 	@s 	@ 	@ 	@r/   c                	  < \         SV `  WV4      '       d   R # V\        4       ,          pV\        4       ,          pV\	        4       ,          pV'       g   V'       g   V'       g   R# R R lpV'       d'   V! V P
                  V4      pV! V P
                  V4      pV'       d'   V! V P                  V4      pV! V P                  V4      pV'       d   V P                  W4      p\         SV `  WV4      # )TFc               $    V ^8  d   QhRRRRRR/# )r'   regexzre.Pattern[str]txtrH   r)   r+   )r,   s   "r-   r.   U_init_checker_class.<locals>.LiteralsOutputChecker.check_output.<locals>.__annotate__l  s!     3 3 3S 3S 3r/   c                2    \         P                  ! V R V4      # )z\1\2)resub)r  r  s   &&r-   remove_prefixesX_init_checker_class.<locals>.LiteralsOutputChecker.check_output.<locals>.remove_prefixesl  s    vveWc22r/   )r   check_outputr=  r>  r?  _unicode_literal_re_bytes_literal_re_remove_unwanted_precision)	r   r  r   r   allow_unicodeallow_bytesallow_numberr  r   s	   &&&&    r-   r  ?_init_checker_class.<locals>.LiteralsOutputChecker.check_outputa  s    w#D{;;'*A*CCM%(=(??K&)9);;L \3 &t'?'?F%d&>&>D&t'='=tD%d&<&<cB55d@7';??r/   c               $    V ^8  d   QhRRRRRR/# )r'   r  rH   r   r)   r+   )r,   s   "r-   r.   r  |  s!     	 	3 	S 	S 	r/   c                	   \        V P                  P                  V4      4      p\        V P                  P                  V4      4      p\        V4      \        V4      8w  d   V# ^ p\	        W4RR7       EFP  w  rgVP                  R4      pVP                  R4      p	V	f   VP                  R4      p	Vf   ^ M
\        V4      p
V	e   V
\        V	4      ,          p
\        VP                  4       4      \        \        VP                  4       4      ^
V
) ,          R7      8X  g   K  VRVP                  4       V,            VP                  4       ,           W'P                  4       V,           R ,           pWVP                  4       VP                  4       ,
          VP                  4       VP                  4       ,
          ,
          ,          pEKS  	  V# )r   T)strictfraction	exponent1N	exponent2)abs)list
_number_refinditerlenziprK   r   floatr   startend)r   r  r   wantsgotsoffsetwgr  exponent	precisions   &&&        r-   r  M_init_checker_class.<locals>.LiteralsOutputChecker._remove_unwanted_precision|  sY   11$78E0056D5zSY&
FE55'(wwz':'(ww{';# ww{3H!)!1As8}	'X.I#veAGGI.>B
N'SS
 0aggi&01AGGI=EEGfDTDV@WW  eeg	1QUUWqwwy5HIIF 6  Jr/   r+   )r   r   r   r   r  compileUNICODEr  r  VERBOSEr  r  r  r   r   r   s   @r-   LiteralsOutputCheckerr  C  sc    
 !jj)CRZZPJJ'A2::NZZ& JJ)

.	@ 	@6	 	r/   r  )r   OutputChecker)r   r  s     r-   _init_checker_classr  @  s"    O 5 5 Ob ! r/   c                   V ^8  d   QhRR/# )r'   r)   zdoctest.OutputCheckerr+   )r,   s   "r-   r.   r.     s      + r/   c                 :    \         f   \        4       s \        4       # )a  Return a doctest.OutputChecker subclass that supports some
additional options:

* ALLOW_UNICODE and ALLOW_BYTES options to ignore u'' and b''
  prefixes (respectively) in string literals. Useful when the same
  doctest should run in Python 2 and Python 3.

* NUMBER to ignore floating-point differences smaller than the
  precision of the literal number in the doctest.

An inner class is used to avoid importing "doctest" at the module
level.
)r%   r  r+   r/   r-   r  r    s     +-?r/   c                   V ^8  d   QhRR/# r'   r)   r   r+   )r,   s   "r-   r.   r.     s     8 8 8r/   c                 .    ^ RI p V P                  ! R4      # )z+Register and return the ALLOW_UNICODE flag.Nr:  r   register_optionflagr@  s    r-   r=  r=    s    &&77r/   c                   V ^8  d   QhRR/# r  r+   )r,   s   "r-   r.   r.     s     6 6s 6r/   c                 .    ^ RI p V P                  ! R4      # )z)Register and return the ALLOW_BYTES flag.Nr;  r  r@  s    r-   r>  r>    s    &&}55r/   c                   V ^8  d   QhRR/# r  r+   )r,   s   "r-   r.   r.     s     1 1# 1r/   c                 .    ^ RI p V P                  ! R4      # )z$Register and return the NUMBER flag.Nr<  r  r@  s    r-   r?  r?    s    &&x00r/   c                    V ^8  d   QhRRRR/# )r'   keyrH   r)   r   r+   )r,   s   "r-   r.   r.     s      C C r/   c           
         ^ RI p\        VP                  \        VP                  \
        VP                  \        VP                  \        ^ /V ,          # )zReturn the actual `doctest` module flag value.

We want to do it as late as possible to avoid importing `doctest` and all
its dependencies when parsing options, as it adds overhead and breaks tests.
N)
r   DOCTEST_REPORT_CHOICE_UDIFFREPORT_UDIFFDOCTEST_REPORT_CHOICE_CDIFFREPORT_CDIFFDOCTEST_REPORT_CHOICE_NDIFFREPORT_NDIFF(DOCTEST_REPORT_CHOICE_ONLY_FIRST_FAILUREREPORT_ONLY_FIRST_FAILUREDOCTEST_REPORT_CHOICE_NONE)r  r   s   & r-   r  r    sN      	$W%9%9#W%9%9#W%9%90'2S2S"A 
 r/   rs   )scopec                   V ^8  d   QhRR/# )r'   r)   zdict[str, Any]r+   )r,   s   "r-   r.   r.     s      > r/   c                     \        4       # )a`  Fixture that returns a :py:class:`dict` that will be injected into the
namespace of doctests.

Usually this fixture is used in conjunction with another ``autouse`` fixture:

.. code-block:: python

    @pytest.fixture(autouse=True)
    def add_np(doctest_namespace):
        doctest_namespace["np"] = numpy

For more details: :ref:`doctest_namespace`.
)r   r+   r/   r-   r   r     s     6Mr/   r   )`__conditional_annotations__r   
__future__r   r   collections.abcr   r   r   r   
contextlibr   r  r}  ospathlibr   r  r  r
  r$  typestypingr	   r
   rw  _pytestr   _pytest._code.coder   r   r   _pytest._ior   _pytest.compatr   _pytest.configr   _pytest.config.argparsingr   _pytest.fixturesr   r   _pytest.nodesr   r   _pytest.outcomesr   r   _pytest.pathlibr   _pytest.pythonr   _pytest.python_apir   _pytest.warning_typesr   r   typing_extensionsr   r  r  r  r  r  rJ   rQ   r%   __annotations__rL   rR   rc   r]   ra   r^   rz   rv  r   r   r   r   rA  rI  rN  rb   r   rk  r  r_   r  r  r=  r>  r?  r  r   )r  s   @r-   <module>r     s   : " 
 $ % $ $ %   	   	 
        , / + & ' ! , $ ' #  - ! & ! % / &# % % % +? ( ,  481 8/dA9&
(l 
(!i !2j(CF$ CFL f >2 % %:IF IXT!n(861" 	y r/   