
    	hh                        U d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z  ddlm!Z! ddl"m#Z# ddl$m%Z% ddl&m'Z' ddl(m)Z) ddl*m+Z+ ddl*m,Z, ddl-m.Z. ddl-m/Z/ ddl0m1Z1 ddl0m2Z2 dd l3m4Z4 dd!l3m5Z5 dd"l6m7Z7 dd#l8m9Z9 dd$l:m;Z; erddl<Z<d%Z=d&Z>d'Z?d(Z@d)ZAe=e>e?e@eAfZBdaCdaDeed*                  eEd+<   d,e)d-dfd.ZFdad/ZGd0ed1e.d-eed2                  fd3ZHd4ed-eIfd5ZJd6e'd4ed1e.d-eIfd7ZKd4ed-eIfd8ZL G d9 d:e!          ZM G d; d<eN          ZOd-ed=         fd>ZP	 	 	 	 dbd@ed*         dAeeI         dBeQdCeId-d=f
dDZR G dE dFe/          ZSd-eeTeQf         fdGZUdH ZVdI ZW G dJ dKe7          ZXdcdNZYdOeZd-eIfdPZ[ed-edQ         fdR            Z\ G dS dTe7          Z]dUeSd-e,fdVZ^d-ed*         fdWZ_dddXZ`d-eQfdYZad-eQfdZZbd-eQfd[Zcd\eTd-eQfd]Zd e+d^_          d-eeTef         fd`            ZedS )ez4Discover and run doctests in modules and test files.    N)contextmanager)Path)Any)Callable)Dict)	Generator)Iterable)List)Optional)Pattern)Sequence)Tuple)Type)TYPE_CHECKING)Union)outcomes)ExceptionInfo)ReprFileLocation)TerminalRepr)TerminalWritersafe_getattr)Config)Parser)fixture)FixtureRequest)	Collector)Item)OutcomeException)skip
fnmatch_ex)import_path)Module)approx)PytestWarningnonecdiffndiffudiffonly_first_failuredoctest.OutputCheckerCHECKER_CLASSparserreturnc                    |                      ddddg           |                      ddd	           |                     d
          }|                    ddddd           |                    dt          j        ddt
          d           |                    ddg ddd           |                    ddddd           |                    dddd d!           d S )"N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 ImportErrors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)r.   groups     \/var/www/html/web-builder-api.evdpl.com/venv/lib/python3.11/site-packages/_pytest/doctest.pypytest_addoptionrM   F   sO   
MM#	     MM=w     OOI&&E	OO.     
OOYH&     
OOA     
OO(*+     
OO'K*          c                  
    d a d S N)RUNNER_CLASS rN   rL   pytest_unconfigurerS   x   s     LLLrN   	file_pathparent)DoctestModuleDoctestTextfilec                 4   |j         }| j        dk    rV|j        j        rIt	          t          |           t          |           f          st                              ||           }|S n/t          || |          rt                              ||           }|S d S )Nz.pypath)configsuffixoptionr9   any_is_setup_py_is_main_pyrV   from_parent_is_doctestrW   )rT   rU   r[   modtxts        rL   pytest_collect_filere   ~   s     ]F5  =' 	)$$k)&<&<=1
 1
 	 "/!:!:6	!:!R!RCJ	VY	/	/ .::6	:RR
4rN   rZ   c                 T    | j         dk    rdS |                                 }d|v pd|v S )Nzsetup.pyFs
   setuptoolss	   distutils)name
read_bytes)rZ   contentss     rL   r_   r_      s8    yJu  HH$@(@@rN   r[   c                     j         dv r|j                                      rdS |                     d          pdg}t	          fd|D                       S )N)z.txtz.rstTrA   z	test*.txtc              3   8   K   | ]}t          |          V  d S rP   r!   ).0globrZ   s     rL   	<genexpr>z_is_doctest.<locals>.<genexpr>   s-      88$z$%%888888rN   )r\   session
isinitpath	getoptionr^   )r[   rZ   rU   globss    `  rL   rb   rb      sh    {&&&6>+D+DT+J+J&t]++<}E8888%888888rN   c                     | j         dk    S )Nz__main__.py)rg   rY   s    rL   r`   r`      s    9%%rN   c                   V    e Zd Zdeeeee         f                  ddfdZdeddfdZ	dS )ReprFailDoctestreprlocation_linesr/   Nc                     || _         d S rP   )rv   )selfrv   s     rL   __init__zReprFailDoctest.__init__   s     #5rN   twc                 ~    | j         D ]4\  }}|D ]}|                    |           |                    |           5d S rP   )rv   line
toterminal)rx   rz   reprlocationlinesr|   s        rL   r}   zReprFailDoctest.toterminal   sZ    #'#: 	( 	(L%  ##B''''	( 	(rN   )
__name__
__module____qualname__r   r   r   rH   ry   r   r}   rR   rN   rL   ru   ru      sn        5"*51A8C=1P+Q"R5	5 5 5 5
(^ ( ( ( ( ( ( (rN   ru   c                   4     e Zd Zded         ddf fdZ xZS )MultipleDoctestFailuresfailureszdoctest.DocTestFailurer/   Nc                 V    t                                                       || _        d S rP   )superry   r   )rx   r   	__class__s     rL   ry   z MultipleDoctestFailures.__init__   s$     rN   )r   r   r   r   ry   __classcell__r   s   @rL   r   r      sQ        !*B!C ! ! ! ! ! ! ! ! ! ! !rN   r   doctest.DocTestRunnerc                  :    dd l  G fddj                  } | S )Nr   c                        e Zd ZdZ	 	 	 	 dded         dee         ded	ed
df
 fdZddddded
dffdZ	ddddde
ee         eej        f         d
dffdZ xZS )/_init_runner_class.<locals>.PytestDoctestRunnerzRunner to collect failures.

        Note that the out variable in this case is a list instead of a
        stdout-like object.
        Nr   Tcheckerr,   verboseoptionflagscontinue_on_failurer/   c                 ^    t                                          |||           || _        d S )N)r   r   r   )r   ry   r   )rx   r   r   r   r   r   s        rL   ry   z8_init_runner_class.<locals>.PytestDoctestRunner.__init__   s2     GGWg;WWW':D$$$rN   testdoctest.DocTestexamplezdoctest.Examplegotc                 h     j         |||          }| j        r|                    |           d S |rP   )DocTestFailurer   r?   )rx   outr   r   r   failuredoctests         rL   report_failurez>_init_runner_class.<locals>.PytestDoctestRunner.report_failure   sC     -g,T7C@@G' 

7#####rN   exc_infoc                    t          |d         t                    r|d         t          |d         t          j                  rt	          j        d            j        |||          }| j        r|                    |           d S |)N   zQuitting debugger)	
isinstancer   bdbBdbQuitr   exitUnexpectedExceptionr   r?   )rx   r   r   r   r   r   r   s         rL   report_unexpected_exceptionzK_init_runner_class.<locals>.PytestDoctestRunner.report_unexpected_exception   s     (1+'788 "qk!(1+s{33 312221g1$JJG' 

7#####rN   NNr   T)r   r   r   __doc__r   boolintry   rH   r   r   r   BaseExceptiontypesTracebackTyper   r   )r   r   s   @rL   PytestDoctestRunnerr      s5       	 	 :>&* (,	; 	;56	; d^	; 		;
 "&	; 	; 	; 	; 	; 	; 	;	 $	 '		
 	 	 	 	 	 	 		 $	 '		
 D/@SST	 	 	 	 	 	 	 	 	 	 	rN   r   )r   DebugRunner)r   r   s    @rL   _init_runner_classr      sL    NNN- - - - - - -g1 - - -^ rN   Tr   r   r   r   c                 R    t           t                      a t          | |||          S )Nr   r   r   r   )rQ   r   r   s       rL   _get_runnerr      s:     )++ /	   rN   c                        e Zd Z	 	 ddeddded         ded         d	df
 fd
Zedddeddddf fd            ZddZddZ	ddZ
dee         d	eeef         f fdZd	eedef         ee         ef         fdZ xZS )DoctestItemNrg   rU   z%Union[DoctestTextfile, DoctestModule]runnerr   dtestr   r/   c                     t                                          ||           || _        || _        d | _        d | _        d S rP   )r   ry   r   r   objfixture_request)rx   rg   rU   r   r   r   s        rL   ry   zDoctestItem.__init__   sB     	v&&&
9=rN   c                N    t                                          ||||          S )zThe public named constructor.)rg   rU   r   r   )r   ra   )clsrU   rg   r   r   r   s        rL   ra   zDoctestItem.from_parent  s'     ww""VFRW"XXXrN   c                     | j         t          |           | _        t          | j        j                  }| j                            d                                          D ]
\  }}|||<   | j         j                            |           d S d S )N)
getfixturedoctest_namespace)r   _setup_fixturesr   dictgetfixturevalueitemsrr   update)rx   rr   rg   values       rL   setupzDoctestItem.setup  s    :!#24#8#8D D$8$HIIIE#3CC#   egg$ $e $dJ##E***** "!rN   c                     | j         J | j        J t          | j                    |                                  g }| j                            | j         |           |rt          |          d S )N)r   )r   r   _check_all_skipped$_disable_output_capturing_for_darwinrunr   )rx   r   s     rL   runtestzDoctestItem.runtest"  s    z%%%{&&&4:&&&1133335 	
111 	4)(333	4 	4rN   c                 T   t          j                    dk    rdS | j        j                            d          }|rm|                    d           |                                \  }}t          j        	                    |           t          j
        	                    |           dS dS )zFDisable output capturing. Otherwise, stdout is lost to doctest (#985).DarwinNcapturemanagerT)in_)platformsystemr[   pluginmanager	getpluginsuspend_global_captureread_global_capturesysstdoutwritestderr)rx   capmanr   errs       rL   r   z0DoctestItem._disable_output_capturing_for_darwin.  s    ?((F*445EFF 	"))d)3331133HCJS!!!JS!!!!!		" 	"rN   excinfoc                    dd l }d }t          |j        |j        |j        f          r	|j        g}n&t          |j        t
                    r|j        j        }|!t                                          |          S g }|D ]}|j	        }|j
        j        }j        d }nj        |j        z   dz   }t          |          j        }	t          |||	          }
t!                      }t#          | j                            d                    }|z|j
        j        J |j
        j                            d          }j        J fdt-          |          D             }|t/          |j        dz
  d          |j        dz            }n>dg}d}|j                                        D ]}|                    d	| d
|            d} t          ||j                  r3||                    ||j        |                              d          z  }nTt;          j        |j                  }|dtA          |j                  z  gz  }|d tC          j"        |j         D             z  }|                    |
|f           tG          |          S )Nr   r   r=   Fc                 :    g | ]\  }}d |j         z   dz   |fz  S )z%03d %sr   )lineno)rl   ixr   s      rL   
<listcomp>z,DoctestItem.repr_failure.<locals>.<listcomp>`  s?       =CaIT[1!4a 88  rN   	   z?EXAMPLE LOCATION UNKNOWN, not showing all tests of that examplez>>>z???  z...
zUNEXPECTED EXCEPTION: %sc                 8    g | ]}|                     d           S )r   )strip)rl   r   s     rL   r   z,DoctestItem.repr_failure.<locals>.<listcomp>t  s/       &'AGGDMM  rN   )$r   r   r   r   r   r   r   r   repr_failurer   r   filenamer   r4   r   r   _get_checker_get_report_choicer[   rq   	docstring
splitlines	enumeratemaxsourcer?   output_differencer   splitr   from_exc_infor   repr	tracebackformat_exceptionru   )rx   r   r   r   rv   r   r   r   r   messager~   r   report_choicer   indentr|   inner_excinfor   r   s                    @rL   r   zDoctestItem.repr_failure:  s    	  	 MG2G4OP
 
 	.  HH'>?? 	.}-H77''000 )	= )	=GoG<D}H{"w~597mm,G+HfgFFL"nnG.t{/D/D_/U/UVVM!|-999.99%@@{...   GPQVGWGW   c'.1"4a887>A;MMN V #N5577 # #DLL!7!7!7!7!7888"FF'7#9:: 	22W[- %++ !. ;G<L M M4tM<O7P7PPQQ  +4+EwGW+X    %%|U&;<<<<1222rN   zos.PathLike[str]c                 L    | j         J | j        | j         j        d| j        z  fS )Nz[doctest] %s)r   rZ   r   rg   )rx   s    rL   
reportinfozDoctestItem.reportinfoz  s+    z%%%y$*+^di-GGGrN   )NNr/   N)r   r   r   rH   r   ry   classmethodra   r   r   r   r   r   r   r   r   r   r   r   r   r   s   @rL   r   r      s       
 59-1> >> 8> 01	>
 )*> 
> > > > > > 
Y7
Y 	
Y
 (
Y !
Y 
Y 
Y 
Y 
Y [
Y+ + + +
4 
4 
4 
4	" 	" 	" 	">3}->3 
sL 	!>3 >3 >3 >3 >3 >3@HE%(:C(?"@(3-QT"TU H H H H H H H HrN   r   c                      dd l } t          | j        | j        | j        | j        | j        | j        t                      t                      t                      	  	        S )Nr   )	DONT_ACCEPT_TRUE_FOR_1DONT_ACCEPT_BLANKLINENORMALIZE_WHITESPACEr3   IGNORE_EXCEPTION_DETAILCOMPARISON_FLAGSALLOW_UNICODEALLOW_BYTESNUMBER)r   r   r   r  r  r3   r  r  _get_allow_unicode_flag_get_allow_bytes_flag_get_number_flagr   s    rL   _get_flag_lookupr    sa    NNN&=%;$9! ' ? 1-//)++!!
 
 
 
rN   c                 z    | j                             d          }t                      }d}|D ]}|||         z  }|S )Nr1   r   )r[   getinir  )rU   optionflags_strflag_lookup_tableflag_accflags        rL   get_optionflagsr    sO    m**+@AAO(**H , ,%d++OrN   c                 b    |                      d          }|r|                      d          rd}|S )NrD   usepdbF)getvalue)r[   r   s     rL   _get_continue_on_failurer    s?     //*GHH ( ??8$$ 	("'rN   c                   *    e Zd ZdZdee         fdZdS )rW   Nr/   c              #     K   dd l }| j                            d          }| j                            |          }t          | j                  }| j        j        }ddi}t          |           }t          d|t                      t          | j                            } |j                    }	|	                    ||||d          }
|
j        r't                              | |
j        ||
          V  d S d S )Nr   r6   r   __main__Fr   r   r   r   rg   r   r   )r   r[   r  rZ   	read_textrH   rg   r  r   r   r  DocTestParserget_doctestexamplesr   ra   )rx   r   encodingtextr   rg   rr   r   r   r.   r   s              rL   r7   zDoctestTextfile.collect  s      ;%%&899y""8,,ty>>y~Z(%d++# NN 8 E E	
 
 
 '&((!!$tXqAA= 	))49V4 *       	 	rN   )r   r   r   r   r	   r   r7   rR   rN   rL   rW   rW     s9        
C+.      rN   rW   r   r   c                 v    ddl t          fd| j        D                       }|rt          d           dS dS )zVRaise pytest.skip() if all examples in the given DocTest have the SKIP
    option set.r   Nc              3   X   K   | ]$}|j                             j        d           V  %dS )FN)optionsgetSKIP)rl   r   r   s     rL   rn   z%_check_all_skipped.<locals>.<genexpr>  s5      PPQaimmGL%88PPPPPPrN   z!all tests skipped by +SKIP option)r   allr   r    )r   all_skippedr   s     @rL   r   r     sY     NNNPPPP$-PPPPPK 20111112 2rN   r   c                 (    t          | dd          duS )zmReturn 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    rL   
_is_mockedr,    s!     	SMtTT	rN   )NNNc               #     K   t           j        dddt          dt          f         dt          t          t          gt          f                  dt          ffd} | t           _        	 dV  t           _        dS # t           _        w xY w)zContext manager which replaces ``inspect.unwrap`` with a version
    that's aware of mock objects and doesn't recurse into them.Nstopfunc.r/  r/   c                     	 |	|t           u r  t                     S |   fd          S # t          $ r'}t          j        d|d dt                      d }~ww xY w)Nr.  c                 8    t          |           p
           S rP   )r,  )r   _stopr0  s    rL   <lambda>zF_patch_unwrap_mock_aware.<locals>._mock_aware_unwrap.<locals>.<lambda>  s    joo6Tt rN   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)r,  	Exceptionwarningswarnr&   )r0  r/  er3  real_unwraps   `  @rL   _mock_aware_unwrapz4_patch_unwrap_mock_aware.<locals>._mock_aware_unwrap  s    	|tz11"{4j9999E;t*T*T*T*T*TUUUU 	 	 	MM GHaaO 	   	s   5 5 
A&"A!!A&)inspectunwrapr   r   r   )r:  r9  s    @rL   _patch_unwrap_mock_awarer=    s       .K MQ  sCx +3HcUCZ4H+I	     " (GN%$$$$$s   &A8 8Bc                   &    e Zd Zdee         fdZdS )rV   r/   c              #     K   dd l } G d d|j                  }| j        j        dk    rJ| j        j                            | j        | j                            d          | j        j                  }n~	 t          | j        | j        j        | j                            d                    }nC# t          $ r6 | j                            d          rt          d	| j        z             n Y nw xY w |            }t          |           }t          d
|t                      t!          | j                            }|                    ||j                  D ].}|j        r%t(                              | |j        ||          V  /d S )Nr   c                   Z     e Zd ZdZ fdZ	 	 d fdZej        dk     r	 fdZ xZ	S  xZ	S )	5DoctestModule.collect.<locals>.MockAwareDocTestFinderzA hackish doctest finder that overrides stdlib internals to fix a stdlib bug.

            https://github.com/pytest-dev/pytest/issues/3456
            https://bugs.python.org/issue25532
            c                     t          |t                    rt          |d|          }t          |d          rt	          j        |          }t                                          ||          S )a3  Doctest code does not take into account `@property`, this
                is a hackish way to fix it. https://bugs.python.org/issue17446

                Wrapped Doctests will need to be unwrapped so the correct
                line number is returned. This will be reported upstream. #8796
                fget__wrapped__)r   propertygetattrhasattrr;  r<  r   _find_lineno)rx   r   source_linesr   s      rL   rH  zBDoctestModule.collect.<locals>.MockAwareDocTestFinder._find_lineno  sm     c8,, 4!#vs33C3.. .!.--C ww++   rN   r/   Nc           
          t          |          rd S t                      5  t                                          |||||||           d d d            d S # 1 swxY w Y   d S rP   )r,  r=  r   _find)	rx   testsr   rg   modulerI  rr   seenr   s	           rL   rK  z;DoctestModule.collect.<locals>.MockAwareDocTestFinder._find  s     c?? F-//  GGMMsD&,t                   s   (AAA)      c                     t          t          d          r!t          |t          j                  r|j        }t                                          ||          S )a>  `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
                    cached_property)rG  	functoolsr   rR  r0  r   _from_module)rx   rM  objectr   s      rL   rT  zBDoctestModule.collect.<locals>.MockAwareDocTestFinder._from_module  sX     y*;<< -	 9B B - "( !77//???rN   r   )
r   r   r   r   rH  rK  r   version_inforT  r   r   s   @rL   MockAwareDocTestFinderrA    s             (		 	 	 	 	 	 '))@ @ @ @ @ @ @ @ @ rN   rW  zconftest.py
importmode)rootpath)rootmoderC   zunable to import module %rFr  r  )r   DocTestFinderrZ   rg   r[   r   _importconftestrq   rY  r#   ImportErrorr  r    r  r   r   r  findr   r   r   ra   )rx   r   rW  rM  finderr   r   r   s           rL   r7   zDoctestModule.collect  s     7	 7	 7	 7	 7	W%: 7	 7	 7	r 9>]**[.>>	%%l33- ?  FF
$I-..|<<  
    ;''(FGG 5	ABBBB CB ('))%d++# NN 8 E E	
 
 
 KK88 	 	D} !--tyt .     	 	s   59B/ /=C/.C/N)r   r   r   r	   r   r7   rR   rN   rL   rV   rV     s;        \+. \ \ \ \ \ \rN   rV   doctest_itemc                     dd}i | _         | j        j        }|                    | |dd          | _        t          | d          }|                                 |S )	zEUsed by DoctestTextfile and DoctestItem to setup fixture information.r/   Nc                      d S rP   rR   rR   rN   rL   r0  z_setup_fixtures.<locals>.funcU  s    rN   F)noder0  r   funcargsT)	_ispytestr   )re  ro   _fixturemanagergetfixtureinfo_fixtureinfor   _fillfixtures)ra  r0  fmr   s       rL   r   r   R  s}        L			-B " 1 1$ !2 ! !L %\TBBBO!!###rN   c                  B    dd l } dd l G fdd| j                  }|S )Nr   c                        e Zd Z                    dj                  Z                    dj                  Z                    dj                  Zde	de	de
def fdZde	de	de	fd	Z xZS )
2_init_checker_class.<locals>.LiteralsOutputCheckerz(\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+)
              )
            )
            wantr   r   r/   c                    t                                          |||          rdS |t                      z  }|t                      z  }|t	                      z  }|s|s|sdS dt
          t                   dt          dt          f	fd}|r" || j        |          } || j        |          }|r" || j        |          } || j        |          }|r| 	                    ||          }t                                          |||          S )NTFregexrd   r/   c                 2                         | d|          S )Nz\1\2)sub)rq  rd   res     rL   remove_prefixeszX_init_checker_class.<locals>.LiteralsOutputChecker.check_output.<locals>.remove_prefixes  s    vveWc222rN   )
r   check_outputr  r	  r
  r   rH   _unicode_literal_re_bytes_literal_re_remove_unwanted_precision)
rx   ro  r   r   allow_unicodeallow_bytesallow_numberru  r   rt  s
           rL   rv  z?_init_checker_class.<locals>.LiteralsOutputChecker.check_output  sI   ww##D#{;; t'*A*C*CCM%(=(?(??K&)9););;L   \ u3ws| 3# 3# 3 3 3 3 3 3  E&t'?FF%od&>DD C&t'=tDD%od&<cBB A55dC@@77''c;???rN   c                    t          | j                            |                    }t          | j                            |                    }t          |          t          |          k    r|S d}t	          ||          D ]o\  }}|                    d          }|                    d          }	|	|                    d          }	|dnt          |          }
|	|
t          |	          z  }
t          |                                          t          t          |                                          d|
 z            k    r|d |	                                |z            |                                z   ||
                                |z   d          z   }||
                                |	                                z
  |
                                |	                                z
  z
  z  }q|S )Nr   fraction	exponent1	exponent2
   )abs)list
_number_refinditerlenziprK   r   floatr%   startend)rx   ro  r   wantsgotsoffsetwgr~  exponent	precisions              rL   ry  zM_init_checker_class.<locals>.LiteralsOutputChecker._remove_unwanted_precision  s   11$7788E005566D5zzSYY&&
FE4(( J J1*+''**=*=*+''+*>*># ww{33H!)!1AAs8}}	'X.I##veAGGII.>.>B
N'S'S'SSS
 0aggii&001AGGII=AEEGGfDTDVDV@WW  aeegg		1QUUWWqwwyy5HIIFJrN   )r   r   r   compileUNICODErw  rx  VERBOSEr  rH   r   r   rv  ry  r   )r   rt  s   @rL   LiteralsOutputCheckerrn  f  s        
 !jj)CRZPPJJ'A2:NNZZ& J)
 

.	@S 	@s 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@6	3 	S 	S 	 	 	 	 	 	 	 	rN   r  )r   rt  OutputChecker)r   r  rt  s     @rL   _init_checker_classr  b  s_    NNNIIIO O O O O O O 5 O O Ob ! rN   c                  H    t           t                      a t                      S )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  rR   rN   rL   r   r     s     +--??rN   c                  *    ddl }  | j        d          S )z+Register and return the ALLOW_UNICODE flag.r   Nr  r   register_optionflagr  s    rL   r  r    s    NNN&7&777rN   c                  *    ddl }  | j        d          S )z)Register and return the ALLOW_BYTES flag.r   Nr  r  r  s    rL   r	  r	    s    NNN&7&}555rN   c                  *    ddl }  | j        d          S )z$Register and return the NUMBER flag.r   Nr  r  r  s    rL   r
  r
    s    NNN&7&x000rN   keyc           
          ddl }t          |j        t          |j        t
          |j        t          |j        t          di|          S )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)r  r   s     rL   r   r     sH     NNN 	$W%9#W%9#W%90'2S"A 
 rN   ro   )scopec                      t                      S )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   rR   rN   rL   r   r     s     66MrN   r   r   )r   r   r/   N)r/   r,   )fr   r   rS  r;  osr   r   r   r   r6  
contextlibr   pathlibr   typingr   r   r   r   r	   r
   r   r   r   r   r   r   r   _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"   r#   _pytest.pythonr$   _pytest.python_apir%   _pytest.warning_typesr&   r   r  r  r  r  r  rJ   rQ   r-   __annotations__rM   rS   re   r   r_   rb   r`   ru   r5  r   r   r   r   r   rH   r  r  r  rW   r   rU  r,  r=  rV   r   r  r   r  r	  r
  r   r   rR   rN   rL   <module>r     sE   : : : 



      				  



       % % % % % %                                                                                                 , , , , , , / / / / / / + + + + + + & & & & & & ' ' ' ' ' ' ! ! ! ! ! ! , , , , , , $ $ $ $ $ $ + + + + + + # # # # # #       - - - - - - ! ! ! ! ! ! & & & & & & ' ' ' ' ' ' ! ! ! ! ! ! % % % % % % / / / / / / NNN# % % % +? ( ,  9=x456 = = =/V / / / / /d    e678   "At A A A A A9 9d 9I 9$ 9 9 9 9&d &t & & & &
( 
( 
( 
( 
(l 
( 
( 
(! ! ! ! !i ! ! !2D!89 2 2 2 2l 26" $	 -.d^  	
    (H H H H H$ H H HD$sCx.             f   >2 2 2 2F t     %),<"= % % % %:] ] ] ] ]F ] ] ]@+ .     U!T"9: U! U! U! U!p   (8 8 8 8 86s 6 6 6 61# 1 1 1 1C C    " 	y4S>      rN   