
    if                    z   % S 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rSSKrSSKrSS	KJr  SSKrSSKrSSKrSSKrSSKrSS
KJ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K0J1r1  SSK2J3r3  SSK4J5r5  SSK6J7r7  \(       a
  SSK8r8SSK9J:r:  Sr;S r<S!r=S"r>S#r?\;\<\=\>\?4r@SqASqBS$\CS%'   SGS& jrDSHS' jrE      SIS( jrFSJS) jrGSKS* jrHSJS+ jrI " S, S-\5      rJ " S. S/\K5      rLSLS0 jrM    SM         SNS1 jjrN " S2 S3\,5      rOSOS4 jrPSPS5 jrQSQS6 jrR " S7 S8\35      rSSRS9 jrTSSS: jrU\
STS; j5       rV " S< S=\35      rWSUS> jrXSVS? jrYSWS@ jrZSWSA jr[SWSB jr\SXSC jr]\(" SDSE9SYSF j5       r^g)Zz4Discover 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           	     T   U R                  SSSS/S9  U R                  SSSS	9  U R                  S
5      nUR                  SSSSSS9  UR                  S[        R                  SS[
        SS9  UR                  SS/ SSSS9  UR                  SSSSSS9  UR                  SSSS S!S9  g )"Ndoctest_optionflagszOption flags for doctestsargsELLIPSIS)typedefaultdoctest_encodingzEncoding used for doctest fileszutf-8)r,   collectz--doctest-modules
store_trueFzRun doctests in all .py modulesdoctestmodules)actionr,   helpdestz--doctest-reportr$   z9Choose another output format for diffs on doctest failuredoctestreport)r+   r,   r2   choicesr3   z--doctest-globappendpatz2Doctests file matching pattern, default: test*.txtdoctestglob)r1   r,   metavarr2   r3   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_failure)addinigetgroup	addoptionstrlowerDOCTEST_REPORT_CHOICES)parsergroups     N/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/_pytest/doctest.pypytest_addoptionrE   F   s    
MM#	   MM=w   OOI&E	OO.   
OOYYH&   
OOA   
OO(/+   
OO'K*      c                     S q g N)RUNNER_CLASS rF   rD   pytest_unconfigurerK   x   s	     LrF   c                *   UR                   nU R                  S:X  aS  UR                  R                  (       a7  [	        [        U 5      [        U 5      45      (       d  [        R                  XS9$ g [        X U5      (       a  [        R                  XS9$ g )Nz.pypath)configsuffixoptionr0   any_is_setup_py_is_main_pyDoctestModulefrom_parent_is_doctestDoctestTextfile)	file_pathparentrO   s      rD   pytest_collect_filer[   ~   s     ]]F5 =='')$k)&<=1
 1
 !,,V,DD  
V	/	/**6*BBrF   c                f    U R                   S:w  a  gU R                  5       nSU;   =(       d    SU;   $ )Nzsetup.pyFs
   setuptoolss	   distutils)name
read_bytes)rN   contentss     rD   rS   rS      s2    yyJ HH$@(@@rF   c                   ^ TR                   S;   a!  UR                  R                  T5      (       a  gU R                  S5      =(       d    S/n[	        U4S jU 5       5      $ )N)z.txtz.rstTr8   z	test*.txtc              3  <   >#    U  H  n[        UT5      v   M     g 7frH   r   ).0globrN   s     rD   	<genexpr>_is_doctest.<locals>.<genexpr>   s     8%$z$%%%s   )rP   session
isinitpath	getoptionrR   )rO   rN   rZ   globss    `  rD   rW   rW      sO    {{&&6>>+D+DT+J+J]+<}E8%888rF   c                     U R                   S:H  $ )Nz__main__.py)r]   rM   s    rD   rT   rT      s    99%%rF   c                  0    \ rS rSr    SS jrSS jrSrg)ReprFailDoctest   c                    Xl         g rH   reprlocation_lines)selfrp   s     rD   __init__ReprFailDoctest.__init__   s
     #5rF   c                    U R                    H0  u  p#U H  nUR                  U5        M     UR                  U5        M2     g rH   )rp   line
toterminal)rq   twreprlocationlinesru   s        rD   rv   ReprFailDoctest.toterminal   s8    #'#:#:L ##B' $;rF   ro   N)rp   z0Sequence[tuple[ReprFileLocation, Sequence[str]]]returnNone)rw   r   r{   r|   )__name__
__module____qualname____firstlineno__rr   rv   __static_attributes__rJ   rF   rD   rl   rl      s    5"R5	5
(rF   rl   c                  ,   ^  \ rS rSrSU 4S jjrSrU =r$ )MultipleDoctestFailures   c                .   > [         TU ]  5         Xl        g rH   )superrr   failures)rq   r   	__class__s     rD   rr    MultipleDoctestFailures.__init__   s     rF   )r   )r   z Sequence[doctest.DocTestFailure]r{   r|   )r}   r~   r   r   rr   r   __classcell__r   s   @rD   r   r      s    ! !rF   r   c                 @   ^ SS K m " U4S jSTR                  5      n U $ )Nr   c                     >^  \ rS rSrSr    S         SU 4S jjjr        S	U4S jjr        S
U4S jjrSrU =r	$ )/_init_runner_class.<locals>.PytestDoctestRunner   zpRunner to collect failures.

Note that the out variable in this case is a list instead of a
stdout-like object.
c                .   > [         TU ]  XUS9  X@l        g )N)checkerverboseoptionflags)r   rr   continue_on_failure)rq   r   r   r   r   r   s        rD   rr   8_init_runner_class.<locals>.PytestDoctestRunner.__init__   s     GW;W':$rF   c                t   > TR                   " X#U5      nU R                  (       a  UR                  U5        g UerH   )DocTestFailurer   r6   )rq   outtestexamplegotfailuredoctests         rD   report_failure>_init_runner_class.<locals>.PytestDoctestRunner.report_failure   s1     ,,TC@G''

7#rF   c                  > [        US   [        5      (       a  US   e[        US   [        R                  5      (       a  [        R
                  " S5        TR                  " X#U5      nU R                  (       a  UR                  U5        g Ue)N   zQuitting debugger)	
isinstancer   bdbBdbQuitr   exitUnexpectedExceptionr   r6   )rq   r   r   r   exc_infor   r   s         rD   report_unexpected_exceptionK_init_runner_class.<locals>.PytestDoctestRunner.report_unexpected_exception   so     (1+'788qk!(1+s{{331211$JG''

7#rF   )r   NNr   T)
r   doctest.OutputChecker | Noner   bool | Noner   intr   boolr{   r|   )r   doctest.DocTestr   doctest.Exampler   r?   r{   r|   )r   r   r   r   r   z>tuple[type[BaseException], BaseException, types.TracebackType]r{   r|   )
r}   r~   r   r   __doc__rr   r   r   r   r   )r   r   s   @rD   PytestDoctestRunnerr      s    	 59#' (,	;1	; !	; 		;
 "&	; 	; 	;	 "	 %		
 	 		 "	 %		
 U	 	 	rF   r   )r   DebugRunner)r   r   s    @rD   _init_runner_classr      s!    -g11 -^ rF   c                <    [         c
  [        5       q [        U UUUS9$ )Nr   r   r   r   )rI   r   r   s       rD   _get_runnerr      s-     )+ /	 rF   c                     ^  \ rS rSr          SU 4S jjr\          SU 4S jj5       rSS jrSS jrSS jr	SS jr
    SU 4S jjrSS	 jrS
rU =r$ )DoctestItem   c                   > [         TU ]  X5        X0l        X@l        S U l        U R
                  R                  nUR                  U S S S9nX`l        UR                  U l
        U R                  5         g )N)nodefunccls)r   rr   runnerdtestobjrf   _fixturemanagergetfixtureinfo_fixtureinfonames_closurefixturenames_initrequest)rq   r]   rZ   r   r   fmfixtureinfor   s          rD   rr   DoctestItem.__init__   sk     	&
 \\))''T$'G''55rF   c                   > [         TU ]  X!X4S9$ )zThe public named constructor.)r]   rZ   r   r   )r   rV   )r   rZ   r]   r   r   r   s        rD   rV   DoctestItem.from_parent  s     w"F"XXrF   c                0    0 U l         [        U SS9U l        g )NT)	_ispytest)funcargsr   _requestrq   s    rD   r   DoctestItem._initrequest  s    +-"448rF   c                (   U R                   R                  5         [        U R                   R                  S9nU R                   R                  S5      R	                  5        H	  u  p#X1U'   M     U R
                  R                  R                  U5        g )N)
getfixturedoctest_namespace)r   _fillfixturesdictgetfixturevalueitemsr   ri   update)rq   ri   r]   values       rD   setupDoctestItem.setup   sk    ##% = =>==889LMSSUKD$K V

&rF   c                    [        U R                  5        U R                  5         / nU R                  R	                  U R                  US9  U(       a  [        U5      eg )N)r   )_check_all_skippedr   $_disable_output_capturing_for_darwinr   runr   )rq   r   s     rD   runtestDoctestItem.runtest'  sL    4::&11313 	

1)(33 rF   c                P   [         R                  " 5       S:w  a  gU R                  R                  R	                  S5      nU(       a`  UR                  SS9  UR                  5       u  p#[        R                  R                  U5        [        R                  R                  U5        gg)zFDisable output capturing. Otherwise, stdout is lost to doctest (#985).DarwinNcapturemanagerT)in_)platformsystemrO   pluginmanager	getpluginsuspend_global_captureread_global_capturesysstdoutwritestderr)rq   capmanr   errs       rD   r   0DoctestItem._disable_output_capturing_for_darwin1  s|    ??(**445EF))d)3113HCJJS!JJS!	 rF   c                  > SS K nS n[        UR                  UR                  UR                  45      (       a  UR                  /nO5[        UR                  [
        5      (       a  UR                  R                  nUc  [        TU ]!  U5      $ / nU GH_  nUR                  nUR                  nUR                  nUR                  c  S n	OUR                  UR                  -   S-   n	[        U5      R                  n
[        XU
5      n[!        5       n[#        U R$                  R'                  S5      5      nU	b  UR                  R(                  c   eUR                  R(                  R+                  S5      nUR                  c   e[-        U5       VVs/ s H  u  nnXR                  -   S-   S SU 3PM     nnnU[/        UR                  S-
  S5      UR                  S-    nO?S/nS	nUR0                  R+                  5        H  nUR3                  S
U SU 35        SnM     [        XRR                  5      (       a.  XR5                  XeR6                  U5      R9                  S5      -  nOt[:        R<                  " UR>                  5      nUSUR                  < 3/-  nU[@        RB                  " UR>                  6  Vs/ s H  nURE                  S5      PM     sn-  nUR3                  X45        GMb     [G        U5      $ s  snnf s  snf )Nr   r   r4   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linenor+   r}   r   _get_checker_get_report_choicerO   rh   	docstring
splitlines	enumeratemaxsourcer6   output_differencer   splitr   from_exc_infor   	tracebackformat_exceptionstriprl   )rq   excinfor   r   rp   r   r   r   r   r   messagerx   r   report_choicery   ixindentru   inner_excinfor   s                       rD   r   DoctestItem.repr_failure=  s    	  	 MMG22G4O4OP
 
  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   $L?Lc                b    U R                   U R                  R                  SU R                   34$ )Nz
[doctest] )rN   r   r   r]   r   s    rD   
reportinfoDoctestItem.reportinfo}  s(    yy$**++z$))-EEErF   )r   r   r   r   r   r   r   )
r]   r?   rZ   DoctestTextfile | DoctestModuler   doctest.DocTestRunnerr   r   r{   r|   )
rZ   r  r]   r?   r   r  r   r   r{   r    r{   r|   )r
  zExceptionInfo[BaseException]r{   zstr | TerminalRepr)r{   z.tuple[os.PathLike[str] | str, int | None, str])r}   r~   r   r   rr   classmethodrV   r   r   r   r   r   r  r   r   r   s   @rD   r   r      s     0 &	
  
& 
Y/
Y 	
Y
 &
Y 
Y 

Y 
Y9'4	">3->3 
>3@F FrF   r   c                     SS K n [        U R                  U R                  U R                  U R
                  U R                  U R                  [        5       [        5       [        5       S9	$ )Nr   )	DONT_ACCEPT_TRUE_FOR_1DONT_ACCEPT_BLANKLINENORMALIZE_WHITESPACEr*   IGNORE_EXCEPTION_DETAILCOMPARISON_FLAGSALLOW_UNICODEALLOW_BYTESNUMBER)r   r   r  r  r  r*   r  r  _get_allow_unicode_flag_get_allow_bytes_flag_get_number_flagr   s    rD   _get_flag_lookupr&    sZ    &==%;;$99!! ' ? ? 11-/)+!
 
rF   c                `    U R                  S5      n[        5       nSnU H
  nX2U   -  nM     U$ )Nr(   r   )getinir&  )rO   optionflags_strflag_lookup_tableflag_accflags        rD   get_optionflagsr-    s;    mm$9:O(*Hd++  OrF   c                f    U R                  S5      nU(       a  U R                  S5      (       a  SnU$ )Nr;   usepdbF)getvalue)rO   r   s     rD   _get_continue_on_failurer1    s2     &0M N ??8$$"'rF   c                  "    \ rS rSrSrSS jrSrg)rX   i  Nc              #    #    SS K nU R                  R                  S5      nU R                  R	                  U5      n[        U R                  5      nU R                  R                  nSS0n[        U R                  5      n[        SU[        5       [        U R                  5      S9nUR                  " 5       n	U	R                  X6XTS5      n
U
R                  (       a!  [        R                  X
R                  XS9v   g g 7f)Nr   r-   r}   __main__Fr   r   r   r   r]   r   r   )r   rO   r(  rN   	read_textr?   r]   r-  r   r   r1  DocTestParserget_doctestexamplesr   rV   )rq   r   encodingtextr   r]   ri   r   r   rB   r   s              rD   r.   DoctestTextfile.collect  s      ;;%%&89yy""8,tyy>yy~~Z(%dkk2# N 8 E	
 &&(!!$tqA==))99V *   s   C=C?rJ   r{   zIterable[DoctestItem])r}   r~   r   r   r   r.   r   rJ   rF   rD   rX   rX     s    
CrF   rX   c                r   ^ SSK m[        U4S jU R                   5       5      nU(       a  [        S5        gg)zRRaise pytest.skip() if all examples in the given DocTest have the SKIP
option set.r   Nc              3  n   >#    U  H*  oR                   R                  TR                  S 5      v   M,     g7f)FN)optionsgetSKIP)rb   r  r   s     rD   rd   %_check_all_skipped.<locals>.<genexpr>  s%     P-QiimmGLL%88-s   25z!all tests skipped by +SKIP option)r   allr:  r   )r   all_skippedr   s     @rD   r   r     s-     P$--PPK01 rF   c                     [        U SS5      SL$ )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    rD   
_is_mockedrI    s     	SMtT	rF   c               #     ^#    [         R                  mSS.     SU4S jjjn U [         l         Sv   T[         l        g! T[         l        f = f7f)z|Context manager which replaces ``inspect.unwrap`` with a version
that's aware of mock objects and doesn't recurse into them.Nstopc                  >^ ^  Ub	  U[         L a  T" T [         S9$ UmT" T UU 4S jS9$ ! [         a*  n[        R                  " SU< ST < S3[        5        e S nAff = f)NrK  c                8   > [        U 5      =(       d    T" T5      $ rH   )rI  )r   _stopr   s    rD   <lambda>F_patch_unwrap_mock_aware.<locals>._mock_aware_unwrap.<locals>.<lambda>  s    jo6Tt6TrF   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)rI  	Exceptionwarningswarnr   )r   rL  erO  real_unwraps   `  @rD   _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   * * 
A%AA)r   zCallable[..., Any]rL  zCallable[[Any], Any] | Noner{   r
   )inspectunwrap)rW  rV  s    @rD   _patch_unwrap_mock_awarer[    sY      ..K JN +F	 " (GN%$s   -AA AAAc                      \ rS rSrSS jrSrg)rU   i  c              #  ~  #    SS K n " S SUR                  5      n U R                  nU R                  R                  R                  U 5        U" 5       n[        U R
                  5      n[        SU[        5       [        U R
                  5      S9nUR!                  WUR"                  5       H6  nUR$                  (       d  M  [&        R)                  XR*                  XgS9v   M8     g ! [        R                   a>    U R
                  R                  S5      (       a  [        SU R                  < 35         GNe f = f7f)	Nr   c                  z  ^  \ rS rSr\R
                  SS r\S:  =(       dQ    \S:H  =(       a    \R
                  R                  S:  =(       d%    \S:H  =(       a    \R
                  R                  S:  r\(       a  U 4S jr	\R
                  S	:  a
    SU 4S
 jjr
\R
                  S:  a  U 4S jrSrU =r$ SrU =r$ )5DoctestModule.collect.<locals>.MockAwareDocTestFinderi  N   )      r   )ra     ra  c                   > [        U[        5      (       a  [        USU5      n[        US5      (       a  [        R
                  " U5      n[        TU ]  UU5      $ )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hasattrrY  rZ  r   _find_lineno)rq   r   source_linesr   s      rD   rj  BDoctestModule.collect.<locals>.MockAwareDocTestFinder._find_lineno  sU     "#x00%c637sM22%nnS1 !7/$ rF   )ra  
   c           
        > [        U5      (       a  g[        5          [        TU ]  XX4XVU5        SSS5        g! , (       d  f       g= f)zOverride _find to work around issue in stdlib.

https://github.com/pytest-dev/pytest/issues/3456
https://github.com/python/cpython/issues/69718
N)rI  r[  r   _find)	rq   testsr   r]   modulerk  ri   seenr   s	           rD   ro  ;DoctestModule.collect.<locals>.MockAwareDocTestFinder._find  s8     "#13!l4 433s	   9
A)ra     c                x   > [        U[        R                  5      (       a  UR                  n[        TU ]  X5      $ )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)rq   rq  objectr   s      rD   rx  BDoctestModule.collect.<locals>.MockAwareDocTestFinder._from_module)  s3     "&)*C*CDD!' !7/??rF   rJ   r  )r}   r~   r   r   r   version_infopy_ver_info_minormicrois_find_lineno_brokenrj  ro  rx  r   r   r   s   @rD   MockAwareDocTestFinderr_    s     # 0 0! 4!G+ Q%0OS5E5E5K5Ka5OQ%0OS5E5E5K5Ka5O "
 %( ')  ')
@ 
@ *rF   r  r:   zunable to import module Fr5  r6  )r   DocTestFinderr   r   CollectErrorrO   r0  r   rN   rf   r   parsefactoriesr-  r   r   r1  findr}   r:  r   rV   r]   )rq   r   r  rq  finderr   r   r   s           rD   r.   DoctestModule.collect  s    ;	@W%:%: ;	@z	XXF 	$$33D9 ()%dkk2# N 8 E	
 KK8D}}}!--yy .   9) %% 	{{##$BCC/		}=>		s/   D=C( BD=%D=(AD:5D=8D::D=rJ   Nr>  )r}   r~   r   r   r.   r   rJ   rF   rD   rU   rU     s    ZrF   rU   c                 8    SS K n  " S SU R                  5      nU$ )Nr   c                     ^  \ rS rSr\R
                  " S\R                  5      r\R
                  " S\R                  5      r\R
                  " S\R                  5      r
SU 4S jjrS	S jrSrU =r$ )
2_init_checker_class.<locals>.LiteralsOutputCheckeriU  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                  > [         TU ]  XU5      (       a  gU[        5       -  nU[        5       -  nU[	        5       -  nU(       d  U(       d  U(       d  gSS jnU(       a&  U" U R
                  U5      nU" U R
                  U5      nU(       a&  U" U R                  U5      nU" U R                  U5      nU(       a  U R                  X5      n[         TU ]  XU5      $ )NTFc                2    [         R                  " U SU5      $ )Nz\1\2)resub)regextxts     rD   remove_prefixesX_init_checker_class.<locals>.LiteralsOutputChecker.check_output.<locals>.remove_prefixes~  s    vveWc22rF   )r  zre.Pattern[str]r  r?   r{   r?   )r   check_outputr"  r#  r$  _unicode_literal_re_bytes_literal_re_remove_unwanted_precision)	rq   wantr   r   allow_unicodeallow_bytesallow_numberr  r   s	           rD   r  ?_init_checker_class.<locals>.LiteralsOutputChecker.check_outputs  s    w#D{;;'*A*CCM%(=(??K&)9);;L \3 &t'?'?F%d&>&>D&t'='=tD%d&<&<cB55d@7';??rF   c                0   [        U R                  R                  U5      5      n[        U R                  R                  U5      5      n[        U5      [        U5      :w  a  U$ Sn[	        X45       GH!  u  pgUR                  S5      nUR                  S5      n	U	c  UR                  S5      n	Uc  SO
[        U5      n
U	b  U
[        U	5      -  n
[        UR                  5       5      [        [        UR                  5       5      SU
* -  S9:X  d  M  US UR                  5       U-    UR                  5       -   X'R                  5       U-   S  -   nXVR                  5       UR                  5       -
  UR                  5       UR                  5       -
  -
  -  nGM$     U$ )Nr   fraction	exponent1	exponent2rm  )abs)list
_number_refinditerlenziprC   r   floatr   startend)rq   r  r   wantsgotsoffsetwgr  exponent	precisions              rD   r  M_init_checker_class.<locals>.LiteralsOutputChecker._remove_unwanted_precision  sT   11$78E0056D5zSY&
FE('(wwz':'(ww{';# ww{3H!)!1As8}	'X.I#veAGGI.>B
N'SS
 0aggi&01AGGI=EEGfDTDV@WW  eeg	1QUUWqwwy5HIIF )  JrF   rJ   )r  r?   r   r?   r   r   r{   r   )r  r?   r   r?   r{   r?   )r}   r~   r   r   r  compileUNICODEr  r  VERBOSEr  r  r  r   r   r   s   @rD   LiteralsOutputCheckerr  U  s]    
 !jj)CRZZPJJ'A2::NZZ& JJ)

.	@6	 	rF   r  )r   OutputChecker)r   r  s     rD   _init_checker_classr  R  s"    O 5 5 Ob ! rF   c                 8    [         c
  [        5       q [        5       $ )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  rJ   rF   rD   r   r     s     +-?rF   c                 .    SSK n U R                  " S5      $ )z+Register and return the ALLOW_UNICODE flag.r   Nr  r   register_optionflagr%  s    rD   r"  r"    s    &&77rF   c                 .    SSK n U R                  " S5      $ )z)Register and return the ALLOW_BYTES flag.r   Nr   r  r%  s    rD   r#  r#    s    &&}55rF   c                 .    SSK n U R                  " S5      $ )z$Register and return the NUMBER flag.r   Nr!  r  r%  s    rD   r$  r$    s    &&x00rF   c           
         SSK n[        UR                  [        UR                  [
        UR                  [        UR                  [        S0U    $ )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.
r   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)keyr   s     rD   r   r     sN      	$W%9%9#W%9%9#W%9%90'2S2S"A 
 rF   rf   )scopec                     [        5       $ )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   rJ   rF   rD   r   r     s     6MrF   )rB   r   r{   r|   r  )rY   r	   rZ   r   r{   z&DoctestModule | DoctestTextfile | None)rN   r	   r{   r   )rO   r   rN   r	   rZ   r   r{   r   )r{   ztype[doctest.DocTestRunner]r   )
r   r   r   r   r   r   r   r   r{   r  )r{   zdict[str, int])rO   r   r{   r   )rO   r   r{   r   )r   r   r{   r|   )r   ry  r{   r   )r{   zGenerator[None])r{   ztype[doctest.OutputChecker])r{   zdoctest.OutputChecker)r{   r   )r  r?   r{   r   )r{   zdict[str, Any])_r   
__future__r   r   collections.abcr   r   r   r   
contextlibr   rv  rY  ospathlibr	   r   r  r   r  typestypingr
   r   rS  _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  rA   rI   r&   __annotations__rE   rK   r[   rS   rW   rT   rl   rR  r   r   r   r   r&  r-  r1  rX   r   rI  r[  rU   r  r   r"  r#  r$  r   r   rJ   rF   rD   <module>r     s   : " 
 $ % $ $ %   	   	 
        , / + & ' ! , $ ' #  - ! & ! % / &# % % % +? ( ,  481 8/d ,A9&
(l 
(!i !2l -1 $	)  	
 (CF$ CFL f >2 % %:[F [|T!n(861" 	y rF   