ó
    áÅŸg�f  ã                  ó~  • % S r SSKJ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	J
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Jr  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKrSSKJr  SSK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/J0r0  SSK1J2r2  SSK3J4r4  SSK5J6r6  \(       a
  SSK7r7SSK8J9r9  S r:S!r;S"r<S#r=S$r>\:\;\<\=\>4r?Sq@SqAS%\BS&'   SHS' jrCSIS( jrD      SJS) jrESKS* jrFSLS+ jrGSKS, jrH " S- S.\5      rI " S/ S0\J5      rKSMS1 jrL    SN         SOS2 jjrM " S3 S4\+5      rNSPS5 jrOSQS6 jrPSRS7 jrQ " S8 S9\25      rRSSS: jrSSTS; jrT\SUS< j5       rU " S= S>\25      rVSVS? jrWSWS@ jrXSXSA jrYSXSB jrZSXSC jr[SYSD jr\\'" SESF9SZSG j5       r]g)[z4Discover and run doctests in modules and test files.é    )ÚannotationsN)Úcontextmanager)ÚPath)ÚAny)ÚCallable)Ú	Generator)ÚIterable)ÚPattern)ÚSequence)Ú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-   r3   Úchoicesr4   z--doctest-globÚappendÚpatz2Doctests file matching pattern, default: test*.txtÚdoctestglob)r2   r-   Úmetavarr3   r4   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     ÚP/var/www/blue/EV-Temp_rev04/venv/lib/python3.13/site-packages/_pytest/doctest.pyÚpytest_addoptionrF   F   sþ   € Ø
‡M�MØØ#ØØ�ð	 ñ ð ‡M�MØÐ=Àwð ñ ð �O‰O˜IÓ&€EØ	‡O�OØØØØ.Øð ñ ð 
‡O�OØÜ�Y‰YØØHÜ&Øð ñ ð 
‡O�OØØØØØAØð ñ ð 
‡O�OØ(ØØØ/Ø+ð ñ ð 
‡O�OØ'ØØØKØ*ð ò ó    c                 ó   • S q g ©N)ÚRUNNER_CLASS© rG   rE   Úpytest_unconfigurerL   x   s	   € ð �LrG   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Úoptionr1   ÚanyÚ_is_setup_pyÚ_is_main_pyÚDoctestModuleÚfrom_parentÚ_is_doctestÚDoctestTextfile)Ú	file_pathÚparentrP   s      rE   Úpytest_collect_filer\   ~   s‡   € ð �]‰]€FØ×Ñ˜5Ó Ø�=‰=×'×'´Ü˜)Ó$¤k°)Ó&<Ð=÷1
ñ 1
ô !×,Ñ,¨VÐ,ÐDÐDð ô 
�V¨×	/Ñ	/Ü×*Ñ*¨6Ð*ÐBÐBØrG   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)rO   Úcontentss     rE   rT   rT   �   s2   € Ø‡y�y�JÓØØ�‰Ó €HØ˜HÑ$×@¨¸Ñ(@Ð@rG   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.rstTr9   z	test*.txtc              3  ó:   >#   • U H  n[        UT5      v •  M     g 7frI   r   )Ú.0ÚglobrO   s     €rE   Ú	<genexpr>Ú_is_doctest.<locals>.<genexpr>˜   s   øé € Ð8±%¨$Œz˜$ ×%Ð%²%ùs   ƒ)rQ   ÚsessionÚ
isinitpathÚ	getoptionrS   )rP   rO   r[   Úglobss    `  rE   rX   rX   ”   sO   ø€ Ø‡{�{Ð&Ó&¨6¯>©>×+DÑ+DÀT×+JÑ+JØØ×Ñ˜]Ó+×<°¨}€EÜÔ8±%Ó8Ó8Ð8rG   c                ó    • U R                   S:H  $ )Nz__main__.py)r^   rN   s    rE   rU   rU   ›   s   € Ø�9‰9˜Ñ%Ð%rG   c                  ó0   • \ rS rSr    SS jrSS jrSrg)ÚReprFailDoctestéŸ   c                ó   • Xl         g rI   ©Úreprlocation_lines)Úselfrq   s     rE   Ú__init__ÚReprFailDoctest.__init__    s
   € ð #5ÕrG   c                ó„   • U R                    H0  u  p#U H  nUR                  U5        M     UR                  U5        M2     g rI   )rq   ÚlineÚ
toterminal)rr   ÚtwÚreprlocationÚlinesrv   s        rE   rw   ÚReprFailDoctest.toterminal¥   s8   € Ø#'×#:Ô#:ÑˆLÛ�Ø—‘˜–ñ à×#Ñ# BÖ'ò $;rG   rp   N)rq   z0Sequence[tuple[ReprFileLocation, Sequence[str]]]ÚreturnÚNone)rx   r   r|   r}   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__rs   rw   Ú__static_attributes__rK   rG   rE   rm   rm   Ÿ   s   † ð5Ø"Rð5à	ô5÷
(rG   rm   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 rI   )Úsuperrs   Úfailures)rr   rˆ   Ú	__class__s     €rE   rs   Ú MultipleDoctestFailures.__init__­   s   ø€ Ü‰ÑÔØ �rG   )rˆ   )rˆ   z Sequence[doctest.DocTestFailure]r|   r}   )r~   r   r€   r�   rs   r‚   Ú__classcell__©r‰   s   @rE   r„   r„   ¬   s   ø† ÷!õ !rG   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‡   rs   Úcontinue_on_failure)rr   r’   r“   r”   r•   r‰   s        €rE   rs   Ú8_init_runner_class.<locals>.PytestDoctestRunner.__init__¼   s   ø€ ô ‰GÑ WÈ;ÐÑWØ':Õ$rG   c                ót   >• TR                   " X#U5      nU R                  (       a  UR                  U5        g UerI   )ÚDocTestFailurer•   r7   )rr   ÚoutÚtestÚexampleÚgotÚfailureÚdoctests         €rE   Úreport_failureÚ>_init_runner_class.<locals>.PytestDoctestRunner.report_failureÆ   s1   ø€ ð ×,Ò,¨T¸CÓ@ˆGØ×'×'Ø—
‘
˜7Õ#à�rG   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•   r7   )rr   r™   rš   r›   Úexc_infor�   rž   s         €rE   Úreport_unexpected_exceptionÚK_init_runner_class.<locals>.PytestDoctestRunner.report_unexpected_exceptionÓ   so   ø€ ô ˜( 1™+Ô'7×8Ñ8Ø˜q‘kÐ!Ü˜( 1™+¤s§{¡{×3Ñ3Ü—’Ð1Ô2Ø×1Ò1°$ÀÓJˆGØ×'×'Ø—
‘
˜7Õ#à�rG   )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__rs   rŸ   r©   r‚   r‹   )r‰   rž   s   @€rE   ÚPytestDoctestRunnerr�   µ   s°   ù† ñ	ð 59Ø#'Ø Ø(,ð	;à1ð	;ð !ð	;ð ð		;ð
 "&ð	;ð ÷	;ð 	;ð	ð "ð	ð %ð		ð
 ð	ð ÷	ð	ð "ð	ð %ð		ð
 Uð	ð ÷	õ 	rG   r³   )rž   ÚDebugRunner)r³   rž   s    @rE   Ú_init_runner_classrµ   ²   s!   ø€ Û÷-˜g×1Ñ1ô -ð^ ÐrG   c                ó<   • [         c
  [        5       q [        U UUUS9$ )N©r’   r“   r”   r•   )rJ   rµ   r·   s       rE   Ú_get_runnerr¸   ç   s-   € ô ÑÜ)Ó+ˆô ØØØØ/ñ	ð rG   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‡   rs   ÚrunnerÚdtestÚobjrg   Ú_fixturemanagerÚgetfixtureinfoÚ_fixtureinfoÚnames_closureÚfixturenamesÚ_initrequest)rr   r^   r[   rÀ   rÁ   ÚfmÚfixtureinfor‰   s          €rE   rs   ÚDoctestItem.__init__ü   sk   ø€ ô 	‰Ñ˜Ô&ØŒØŒ
ð ˆŒØ�\‰\×)Ñ)ˆØ×'Ñ'¨T¸À$Ð'ÐGˆØ'ÔØ'×5Ñ5ˆÔØ×ÑÕrG   c               ó    >• [         TU ]  X!X4S9$ )zThe public named constructor.)r^   r[   rÀ   rÁ   )r‡   rW   )r¿   r[   r^   rÀ   rÁ   r‰   s        €rE   rW   ÚDoctestItem.from_parent  s   ø€ ô ‰wÑ"¨ÀFÐ"ÐXÐXrG   c                ó0   • 0 U l         [        U SS9U l        g )NT)Ú	_ispytest)Úfuncargsr   Ú_request©rr   s    rE   rÈ   ÚDoctestItem._initrequest  s   € Ø+-ˆŒÜ" 4°4Ñ8ˆ�rG   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Á   rj   Úupdate)rr   rj   r^   Úvalues       rE   ÚsetupÚDoctestItem.setup   sk   € Ø�‰×#Ñ#Ô%Ü §¡× =Ñ =Ñ>ˆØŸ=™=×8Ñ8Ð9LÓM×SÑSÖU‰KˆDØ�$‹Kñ Và�
‰
×Ñ×Ñ Õ&rG   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„   )rr   rˆ   s     rE   ÚruntestÚDoctestItem.runtest'  sL   € Ü˜4Ÿ:™:Ô&Ø×1Ñ1Ô3Ø13ˆð 	�‰�‰˜Ÿ
™
¨ˆÑ1ÞÜ)¨(Ó3Ð3ð rG   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ÚsystemrP   ÚpluginmanagerÚ	getpluginÚsuspend_global_captureÚread_global_captureÚsysÚstdoutÚwriteÚstderr)rr   Úcapmanr™   Úerrs       rE   rá   Ú0DoctestItem._disable_output_capturing_for_darwin1  s|   € ä�?Š?Ó Ó(ØØ—‘×*Ñ*×4Ñ4Ð5EÓFˆÞØ×)Ñ)¨dÐ)Ñ3Ø×1Ñ1Ó3‰HˆCÜ�J‰J×Ñ˜SÔ!Ü�J‰J×Ñ˜SÕ!ð	 rG   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
[        X‰U
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SX÷R                  -   S-   U4-  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.  XìR5                  XeR6                  U5      R9                  S5      -  nOs[:        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                  X¾45        GM_     [G        U5      $ s  snnf s  snf )Nr   r¢   r5   Fz%03d %sé	   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_choicerP   ri   Ú	docstringÚ
splitlinesÚ	enumerateÚmaxÚsourcer7   Úoutput_differencerœ   Úsplitr   Úfrom_exc_infor¨   Ú	tracebackÚformat_exceptionÚstriprm   )rr   Úexcinforž   rˆ   rq   r�   r›   rš   rû   rü   Úmessagery   r’   Úreport_choicerz   ÚiÚxÚindentrv   Úinner_excinfor‰   s                       €rE   rú   ÚDoctestItem.repr_failure=  sÓ  ø€ ó 	ð ð 	ô Ø�M‰M˜G×2Ñ2°G×4OÑ4OÐP÷
ñ 
ð  Ÿ™�‰HÜ˜Ÿ™Ô'>×?Ñ?Ø—}‘}×-Ñ-ˆHàÑÜ‘7Ñ'¨Ó0Ð0àÐÜˆGØ—o‘oˆGØ—<‘<ˆDØ—}‘}ˆHØ�{‰{Ñ"Ø‘àŸ™ w§~¡~Ñ5¸Ñ9�Ü˜7“m×,Ñ,ˆGä+¨H¸gÓFˆLÜ"“nˆGÜ.¨t¯{©{×/DÑ/DÀ_Ó/UÓVˆMØÑ!Ø—|‘|×-Ñ-Ñ9Ð9Ð9ØŸ™×.Ñ.×9Ñ9¸%Ó@�à—{‘{Ñ.Ð.Ð.äGPÐQVÔGWôÙGW¹V¸aÀ�I §[¡[¡°1Ñ!4°aÐ 8Ô8ÑGWð ñ ð œc '§.¡.°1Ñ"4°aÓ8¸7¿>¹>ÈAÑ;MÐN‘ð Vð�ð �Ø#ŸN™N×5Ñ5Ö7�DØ—L‘L 4¨ x¨q°°Ð!7Ô8Ø"’Fñ 8ô ˜'×#9Ñ#9×:Ñ:Ø×2Ñ2ØŸ[™[¨-óç‘%˜“+ñ‘ô !.× ;Ò ;¸G×<LÑ<LÓ M�ØÐ2°=×3FÑ3FÑ2IÐJÐKÑK�ØÜ+4×+EÒ+EÀw×GWÑGWÑ+XóÙ+X a�A—G‘G˜D–MÑ+Xññ �ð ×%Ñ% |Ð&;×<ñS  ôT Ð1Ó2Ð2ùó1ùò(s   Æ"K>Ê=Lc                ób   • U R                   U R                  R                  SU R                   34$ )Nz
[doctest] )rO   rÁ   rü   r^   rÒ   s    rE   Ú
reportinfoÚDoctestItem.reportinfo}  s(   € Ø�y‰y˜$Ÿ*™*×+Ñ+¨z¸$¿)¹)¸Ð-EÐEÐErG   )rÅ   rÑ   rÁ   rÇ   rÐ   rÂ   rÀ   )
r^   r@   r[   úDoctestTextfile | DoctestModulerÀ   údoctest.DocTestRunnerrÁ   r°   r|   r}   )
r[   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�   rs   ÚclassmethodrW   rÈ   rÝ   rã   rá   rú   r  r‚   r‹   rŒ   s   @rE   rº   rº   û   s»   ø† ðàðð 0ðð &ð	ð
 ðð 
÷ð& ð
Yà/ð
Yð ð	
Yð
 &ð
Yð ð
Yð 
ö
Yó ð
Yô9ô'ô4ô	"ð>3à-ð>3ð 
÷>3÷@Fò FrG   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    rE   Ú_get_flag_lookupr&  �  sZ   € ÛäØ&×=Ñ=Ø%×;Ñ;Ø$×9Ñ9Ø×!Ñ!Ø '× ?Ñ ?Ø ×1Ñ1Ü-Ó/Ü)Ó+ÜÓ!ñ
ð 
rG   c                ó`   • U R                  S5      n[        5       nSnU H
  nX2U   -  nM     U$ )Nr)   r   )Úgetinir&  )rP   Úoptionflags_strÚflag_lookup_tableÚflag_accÚflags        rE   Úget_optionflagsr-  ‘  s;   € Ø—m‘mÐ$9Ó:€OÜ(Ó*ÐØ€HÛˆØ dÑ+Ñ+Šñ  à€OrG   c                óf   • U R                  S5      nU(       a  U R                  S5      (       a  SnU$ )Nr<   ÚusepdbF)Úgetvalue)rP   r•   s     rE   Ú_get_continue_on_failurer1  š  s2   € Ø &§¡Ð0MÓ NÐÞð �?‰?˜8×$Ñ$Ø"'ÐØÐrG   c                  ó"   • \ rS rSrSrSS jrSrg)rY   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                  XŠS9v •  g g 7f)Nr   r.   r~   Ú__main__F©r“   r”   r’   r•   ©r^   rÀ   rÁ   )rž   rP   r(  rO   Ú	read_textr@   r^   r-  r¸   rý   r1  ÚDocTestParserÚget_doctestÚexamplesrº   rW   )rr   rž   ÚencodingÚtextrû   r^   rj   r”   rÀ   rC   rš   s              rE   r/   ÚDoctestTextfile.collect§  s×   é € Ûð —;‘;×%Ñ%Ð&8Ó9ˆØ�y‰y×"Ñ" 8Ó,ˆÜ�t—y‘y“>ˆØ�y‰y�~‰~ˆØ˜ZÐ(ˆä% d§k¡kÓ2ˆäØØ#Ü “NÜ 8¸¿¹Ó Eñ	
ˆð ×&Ò&Ó(ˆØ×!Ñ! $¨t¸qÓAˆØ�=�=Ü×)Ñ)ØŸ9™9¨Vð *ð ó ð ùs   ‚C=C?rK   ©r|   zIterable[DoctestItem])r~   r   r€   r�   rÂ   r/   r‚   rK   rG   rE   rY   rY   ¤  s   † Ø
€C÷rG   rY   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  ól   >#   • U H*  oR                   R                  TR                  S 5      v •  M,     g7f)FN)ÚoptionsÚgetÚSKIP)rc   r  rž   s     €rE   re   Ú%_check_all_skipped.<locals>.<genexpr>È  s%   øé € ÐPÁ-¸Q—i‘i—m‘m G§L¡L°%×8Ð8Â-ùs   ƒ14z!all tests skipped by +SKIP option)rž   Úallr:  r   )rš   Úall_skippedrž   s     @rE   rà   rà   Ã  s-   ø€ ó äÔPÀ$Ç-Â-ÓPÓP€KÞÜÐ0Õ1ð rG   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    rE   Ú
_is_mockedrI  Í  s   € ô 	�SÐMÈtÓTØð	ðrG   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      $ rI   )rI  )rÂ   Ú_stopr¾   s    €€rE   Ú<lambda>ÚF_patch_unwrap_mock_aware.<locals>._mock_aware_unwrap.<locals>.<lambda>ã  s   ø€ ´jÀ³o×6TÉÈtËÐ6TrG   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   `  @€rE   Ú_mock_aware_unwrapÚ4_patch_unwrap_mock_aware.<locals>._mock_aware_unwrapÜ  st   ú€ ð	Ø‰|˜t¤zÒ1Ù" 4¬jÑ9Ð9ØˆEÙ˜tÕ*TÑUÐUøÜó 	Ü�MŠMØ�q‘eÐ,¨T©Hð 5Cð Cô ô	ð ûð	ús   …* œ* ª
A´%AÁA)r¾   zCallable[..., Any]rL  zCallable[[Any], Any] | Noner|   r   )ÚinspectÚunwrap)rW  rV  s    @rE   Ú_patch_unwrap_mock_awarer[  Ö  sY   øé € ô —.‘.€Kð JNñØ ðØ+Fðà	÷ð ð" („G„Nð%Ûà$Œ�ø˜Œ�üs   ƒ-A±A µAÁAÁAc                  ó   • \ rS rSrSS jrSrg)rV   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      $ )zÕOn 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)rr   rÂ   Úsource_linesr‰   s      €rE   rj  ÚBDoctestModule.collect.<locals>.MockAwareDocTestFinder._find_lineno  sU   ø€ ô " #¤x×0Ñ0Ü% c¨6°3Ó7˜ä˜s M×2Ñ2ä%Ÿnšn¨SÓ1˜ô !™7Ñ/ØØ$óð rG   )ra  é
   c           
     ó”   >• [        U5      (       a  g[        5          [        TU ]  XX4XVU5        SSS5        g! , (       d  f       g= f)z�Override _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)	rr   ÚtestsrÂ   r^   Úmodulerk  rj   Úseenr‰   s	           €rE   ro  Ú;DoctestModule.collect.<locals>.MockAwareDocTestFinder._find  s8   ø€ ô " #—‘ØÜ1Õ3ä™™Ø!¨°lÈ4ô÷ 4×3Ö3ús	   �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)rr   rq  Úobjectr‰   s      €rE   rx  ÚBDoctestModule.collect.<locals>.MockAwareDocTestFinder._from_module)  s3   ø€ ô " &¬)×*CÑ*C×DÑDØ!'§¡˜ô !™7Ñ/°Ó?Ð?rG   rK   r  )r~   r   r€   r�   rï   Úversion_infoÚpy_ver_info_minorÚmicroÚis_find_lineno_brokenrj  ro  rx  r‚   r‹   rŒ   s   @rE   ÚMockAwareDocTestFinderr_  ø  s³   ø† Ø #× 0Ñ 0°°!Ð 4Ðà! GÑ+÷ QØ%¨Ñ0×O°S×5EÑ5E×5KÑ5KÈaÑ5O÷Qà%¨Ñ0×O°S×5EÑ5E×5KÑ5KÈaÑ5Oð "ö
 %õð( ×Ñ 'Ó)ðà÷ð  ×Ñ 'Ó)÷
@ó 
@õ *rG   r  r;   zunable to import module Fr5  r6  )rž   ÚDocTestFinderrÂ   r   ÚCollectErrorrP   r0  r   rO   rg   rÃ   Úparsefactoriesr-  r¸   rý   r1  Úfindr~   r:  rº   rW   r^   )rr   rž   r  rq  Úfinderr”   rÀ   rš   s           rE   r/   ÚDoctestModule.collectõ  s  é € Ûô;	@ W×%:Ñ%:ô ;	@ðz	Ø—X‘XˆFð 	�‰×$Ñ$×3Ñ3°DÔ9ñ (Ó)ˆÜ% d§k¡kÓ2ˆÜØØ#Ü “NÜ 8¸¿¹Ó Eñ	
ˆð —K‘K ¨¯©Ö8ˆDØ�}�}‰}Ü!×-Ñ-ØŸy™y°ð .ð ô ò 9øô) ×%Ñ%ó 	Ø�{‰{×#Ñ#Ð$B×CÑCÜÐ/°·	±	©}Ð=×>àð		üs/   ‚D=�C( ©BD=Ã%D=Ã(AD:Ä5D=Ä8D:Ä:D=rK   Nr>  )r~   r   r€   r�   r/   r‚   rK   rG   rE   rV   rV   ô  s   † ÷ZrG   rV   c                 óH   ^• SS K n SS Km " U4S jSU R                  5      nU$ )Nr   c                  óî   >^ • \ rS rSr YR	                  S YR
                  5      r YR	                  S YR
                  5      r YR	                  S YR                  5      r	SU U4S jjr
S	S jrSrU =r$ )
Ú2_init_checker_class.<locals>.LiteralsOutputCheckeriV  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U	4S j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                ó*   >• TR                  U SU5      $ )Nz\1\2)Úsub)ÚregexÚtxtÚres     €rE   Úremove_prefixesÚX_init_checker_class.<locals>.LiteralsOutputChecker.check_output.<locals>.remove_prefixes  s   ø€ Ø—v‘v˜e W¨cÓ2Ð2rG   )rŒ  zPattern[str]r�  r@   r|   r@   )r‡   Úcheck_outputr"  r#  r$  Ú_unicode_literal_reÚ_bytes_literal_reÚ_remove_unwanted_precision)
rr   Úwantrœ   r”   Úallow_unicodeÚallow_bytesÚallow_numberr�  r‰   rŽ  s
           €€rE   r‘  Ú?_init_checker_class.<locals>.LiteralsOutputChecker.check_outputt  sÆ   ø€ Ü‰wÑ# D¨{×;Ñ;Øà'Ô*AÓ*CÑCˆMØ%Ô(=Ó(?Ñ?ˆKØ&Ô)9Ó);Ñ;ˆLæ ®¾\Ø÷3ö Ù& t×'?Ñ'?ÀÓF�Ù% d×&>Ñ&>ÀÓD�æÙ& t×'=Ñ'=¸tÓD�Ù% d×&<Ñ&<¸cÓB�æØ×5Ñ5°dÓ@�ä‘7Ñ'¨°;Ó?Ð?rG   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ÚziprD   r®   Úfloatr   ÚstartÚend)rr   r•  rœ   ÚwantsÚgotsÚoffsetÚwÚgr›  ÚexponentÚ	precisions              rE   r”  ÚM_init_checker_class.<locals>.LiteralsOutputChecker._remove_unwanted_precision�  sT  € Ü˜Ÿ™×1Ñ1°$Ó7Ó8ˆEÜ˜Ÿ™×0Ñ0°Ó5Ó6ˆDÜ�5‹zœS ›YÓ&Ø�
ØˆFÜ˜E×(‘�Ø'(§w¡w¨zÓ':�Ø'(§w¡w¨{Ó';�ØÑ#Ø Ÿw™w {Ó3�HØ!)Ñ!1™A´s¸8³}�	ØÑ'Ø¤ X£Ñ.�IÜ˜Ÿ™›Ó#¤v¬e°A·G±G³IÓ.>ÀBÈÈ
ÁNÑ'SÕSð
 Ð0˜aŸg™g›i¨&Ñ0Ð1°A·G±G³IÑ=ÀÇEÁEÃGÈfÑDTÐDVÐ@WÑWð ð Ÿe™e›g¨¯©«	Ñ1°Q·U±U³W¸q¿w¹w»yÑ5HÑIÑI“Fñ )ð  ˆJrG   rK   )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‰   rŽ  s   @€rE   ÚLiteralsOutputCheckerrˆ  V  sc   ù† ñ
 !Ÿj™jÐ)CÁRÇZÁZÓPÐÙŸJ™JÐ'AÁ2Ç:Á:ÓNÐÙ—Z‘Zðñ& �J‰Jó)
ˆ
÷.	@ð 	@÷6	ò 	rG   r²  )rž   rŽ  ÚOutputChecker)rž   r²  rŽ  s     @rE   Ú_init_checker_classr´  R  s&   ø€ ÛÛ÷O × 5Ñ 5ô Oðb !Ð rG   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´  rK   rG   rE   rý   rý   ª  s   € ô ÑÜ+Ó-ˆÜ‹?ÐrG   c                 ó.   • SSK n U R                  " S5      $ )z+Register and return the ALLOW_UNICODE flag.r   Nr  ©rž   Úregister_optionflagr%  s    rE   r"  r"  ¾  s   € ãà×&Ò& Ó7Ð7rG   c                 ó.   • SSK n U R                  " S5      $ )z)Register and return the ALLOW_BYTES flag.r   Nr   r·  r%  s    rE   r#  r#  Å  s   € ãà×&Ò& }Ó5Ð5rG   c                 ó.   • SSK n U R                  " S5      $ )z$Register and return the NUMBER flag.r   Nr!  r·  r%  s    rE   r$  r$  Ì  s   € ãà×&Ò& xÓ0Ð0rG   c           
     ó    • SSK n[        UR                  [        UR                  [
        UR                  [        UR                  [        S0U    $ )zÇReturn 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     rE   rþ   rþ   Ó  sN   € ó ô 	$ W×%9Ñ%9Ü# W×%9Ñ%9Ü# W×%9Ñ%9Ü0°'×2SÑ2SÜ" Aðð 
ñð rG   rg   )Ú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Ø   rK   rG   rE   rÖ   rÖ   ä  s   € ô ‹6€MrG   )rC   r   r|   r}   r  )rZ   r   r[   r   r|   z&DoctestModule | DoctestTextfile | None)rO   r   r|   r¯   )rP   r   rO   r   r[   r   r|   r¯   )r|   ztype[doctest.DocTestRunner]r«   )
r’   r¬   r“   r­   r”   r®   r•   r¯   r|   r  )r|   zdict[str, int])rP   r   r|   r®   )rP   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¤   Ú
contextlibr   rv  rY  ÚosÚpathlibr   ré   rï   r  ÚtypesÚtypingr   r   r   r	   r
   r   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Â  rB   rJ   r'   Ú__annotations__rF   rL   r\   rT   rX   rU   rm   rR  r„   rµ   r¸   rº   r&  r-  r1  rY   rà   rI  r[  rV   r´  rý   r"  r#  r$  rþ   rÖ   rK   rG   rE   Ú<module>rÝ     sö  ðâ :å "ã 
Ý %Û Û Û 	Ý Û Û 
Û Û Ý Ý Ý Ý Ý Ý Ý  Û å Ý ,Ý /Ý +Ý &Ý 'Ý !Ý ,Ý $Ý 'Ý #Ý Ý -Ý !Ý &Ý !Ý %Ý /ö Ûå&à#Ð Ø%Ð Ø%Ð Ø%Ð Ø+?Ð (ð ØØØØ,ðÐ ð €à48€Ð1Ó 8ô/ôdðØðàðð ,ôôAô9ô&ô
(�lô 
(ô!˜iô !ô2ðl -1ØØØ $ð	Ø)ðàðð ðð ð	ð
 õô(CF�$ô CFôLô ôô�fô ô>2ôð ó%ó ð%ô:[�Fô [ô|U!ôpô(8ô6ô1ôñ" 	ˆyÑóó ñrG   