Ë
    V.j�f  ã                  óN  — U d Z ddlmZ ddlZddlmZ ddlZddlZddlZddl	m
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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/m0Z0 ddl1m2Z2 ddl3m4Z4 ddl5m6Z6 er
ddl7Z7ddl8m9Z9 d Z:d!Z;d"Z<d#Z=d$Z>e:e;e<e=e>fZ?da@daAd%eBd&<   dHd'„ZCdId(„ZD	 	 	 	 	 	 dJd)„ZEdKd*„ZFdLd+„ZGdKd,„ZH G d-„ d.e«      ZI G d/„ d0eJ«      ZKdMd1„ZL	 	 	 	 dN	 	 	 	 	 	 	 	 	 dOd2„ZM G d3„ d4e+«      ZNdPd5„ZOdQd6„ZPdRd7„ZQ G d8„ d9e2«      ZRdSd:„ZSdTd;„ZTedUd<„«       ZU G d=„ d>e2«      ZVdVd?„ZWdWd@„ZXdXdA„ZYdXdB„ZZdXdC„Z[dYdD„Z\ e'dE¬F«      dZdG„«       Z]y)[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                ó~  — | j                  ddddg¬«       | j                  ddd¬	«       | j                  d
«      }|j                  ddddd¬«       |j                  dt        j                  ddt
        d¬«       |j                  ddg ddd¬«       |j                  ddddd¬«       |j                  dddd d!¬«       y )"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     úQC:\xampp\htdocs\tradingbinance\backend\.venv\Lib\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                 ó   — d a y ©N)ÚRUNNER_CLASS© rG   rE   Úpytest_unconfigurerL   x   s	   € ð �LrG   c                ó  — |j                   }| j                  dk(  rM|j                  j                  r6t	        t        | «      t        | «      f«      st        j                  || ¬«      S y t        || |«      rt        j                  || ¬«      S y )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
ô !×,Ñ,¨V¸)Ð,ÓDÐDð ô 
�V˜Y¨Ô	/Ü×*Ñ*¨6¸	Ð*ÓBÐBØrG   c                óV   — | j                   dk7  ry| j                  «       }d|v xs d|v S )Nzsetup.pyFs
   setuptoolss	   distutils)ÚnameÚ
read_bytes)rO   Úcontentss     rE   rT   rT   �   s2   € Ø‡y�y�JÒØØ�‰Ó €HØ˜HÐ$Ò@¨¸Ð(@Ð@rG   c                ó¬   ‡— ‰j                   dv r|j                  j                  ‰«      ry| j                  d«      xs dg}t	        ˆfd„|D «       «      S )N)z.txtz.rstTr9   z	test*.txtc              3  ó6   •K  — | ]  }t        |‰«      –— Œ y ­wrI   r   )Ú.0ÚglobrO   s     €rE   Ú	<genexpr>z_is_doctest.<locals>.<genexpr>˜   s   øè ø€ Ð8±%¨$Œz˜$ ×%±%ùs   ƒ)rQ   ÚsessionÚ
isinitpathÚ	getoptionrS   )rP   rO   r[   Úglobss    `  rE   rX   rX   ”   sL   ø€ Ø‡{�{Ð&Ñ&¨6¯>©>×+DÑ+DÀTÔ+JØØ×Ñ˜]Ó+Ò<°¨}€EÜÓ8±%Ó8Ó8Ð8rG   c                ó    — | j                   dk(  S )Nz__main__.py)r^   rN   s    rE   rU   rU   ›   s   € Ø�9‰9˜Ñ%Ð%rG   c                  ó$   — e Zd Z	 	 	 	 dd„Zdd„Zy)ÚReprFailDoctestc                ó   — || _         y rI   )Úreprlocation_lines)Úselfrn   s     rE   Ú__init__zReprFailDoctest.__init__    s   € ð #5ˆÕrG   c                ó~   — | j                   D ].  \  }}|D ]  }|j                  |«       Œ |j                  |«       Œ0 y rI   )rn   ÚlineÚ
toterminal)ro   ÚtwÚreprlocationÚlinesrr   s        rE   rs   zReprFailDoctest.toterminal¥   s:   € Ø#'×#:Ô#:ÑˆL˜%Û�Ø—‘˜•ð à×#Ñ# BÕ'ñ $;rG   N)rn   z0Sequence[tuple[ReprFileLocation, Sequence[str]]]ÚreturnÚNone)rt   r   rw   rx   )Ú__name__Ú
__module__Ú__qualname__rp   rs   rK   rG   rE   rl   rl   Ÿ   s   „ ð5Ø"Rð5à	ó5ô
(rG   rl   c                  ó    ‡ — e Zd Zdˆ fd„Zˆ xZS )ÚMultipleDoctestFailuresc                ó0   •— t         ‰| �  «        || _        y rI   )Úsuperrp   Úfailures)ro   r€   Ú	__class__s     €rE   rp   z MultipleDoctestFailures.__init__­   s   ø€ Ü‰ÑÔØ ˆ�rG   )r€   z Sequence[doctest.DocTestFailure]rw   rx   )ry   rz   r{   rp   Ú__classcell__©r�   s   @rE   r}   r}   ¬   s   ø„ ÷!ñ !rG   r}   c                 ó>   ‡— dd l Š G ˆfd„d‰j                  «      } | S )Nr   c                  óz   •‡ — e Zd ZdZ	 	 	 	 d	 	 	 	 	 	 	 	 	 dˆ fd„Z	 	 	 	 	 	 	 	 dˆfd„Z	 	 	 	 	 	 	 	 dˆfd„Zˆ xZS )	ú/_init_runner_class.<locals>.PytestDoctestRunnerzˆRunner to collect failures.

        Note that the out variable in this case is a list instead of a
        stdout-like object.
        c                ó8   •— t         ‰| �  |||¬«       || _        y )N)ÚcheckerÚverboseÚoptionflags)r   rp   Úcontinue_on_failure)ro   rˆ   r‰   rŠ   r‹   r�   s        €rE   rp   z8_init_runner_class.<locals>.PytestDoctestRunner.__init__¼   s!   ø€ ô ‰GÑ W°gÈ;ÐÔWØ':ˆDÕ$rG   c                ól   •—  ‰j                   |||«      }| j                  r|j                  |«       y |‚rI   )ÚDocTestFailurer‹   r7   )ro   ÚoutÚtestÚexampleÚgotÚfailureÚdoctests         €rE   Úreport_failurez>_init_runner_class.<locals>.PytestDoctestRunner.report_failureÆ   s5   ø€ ð -�g×,Ñ,¨T°7¸CÓ@ˆGØ×'Ò'Ø—
‘
˜7Õ#à�rG   c                ó   •— t        |d   t        «      r|d   ‚t        |d   t        j                  «      rt	        j
                  d«        ‰j                  |||«      }| j                  r|j                  |«       y |‚)Né   zQuitting debugger)	Ú
isinstancer   ÚbdbÚBdbQuitr   ÚexitÚUnexpectedExceptionr‹   r7   )ro   rŽ   r�   r�   Úexc_infor’   r“   s         €rE   Úreport_unexpected_exceptionzK_init_runner_class.<locals>.PytestDoctestRunner.report_unexpected_exceptionÓ   sm   ø€ ô ˜( 1™+Ô'7Ô8Ø˜q‘kÐ!Ü˜( 1™+¤s§{¡{Ô3Ü—‘Ð1Ô2Ø1�g×1Ñ1°$¸ÀÓJˆGØ×'Ò'Ø—
‘
˜7Õ#à�rG   ©NNr   T)
rˆ   údoctest.OutputChecker | Noner‰   úbool | NonerŠ   Úintr‹   Úboolrw   rx   )r�   údoctest.DocTestr�   údoctest.Exampler‘   r@   rw   rx   )r�   r£   r�   r¤   rœ   z>tuple[type[BaseException], BaseException, types.TracebackType]rw   rx   )ry   rz   r{   Ú__doc__rp   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                ó@   — t         €
t        «       a t        | |||¬«      S )N©rˆ   r‰   rŠ   r‹   )rJ   r¨   rª   s       rE   Ú_get_runnerr«   ç   s-   € ô ÐÜ)Ó+ˆô ØØØØ/ô	ð rG   c                  óš   ‡ — e Zd Z	 	 	 	 	 	 	 	 	 	 d	ˆ fd„Ze	 	 	 	 	 	 	 	 	 	 d
ˆ fd„«       Zdd„Zdd„Zdd„Zdd„Z		 	 	 	 dˆ fd„Z
dd„Zˆ xZS )ÚDoctestItemc                óô   •— t         ‰| �  ||«       || _        || _        d | _        | j
                  j                  }|j                  | d d ¬«      }|| _        |j                  | _
        | j                  «        y )N)ÚnodeÚfuncÚcls)r   rp   ÚrunnerÚdtestÚobjrf   Ú_fixturemanagerÚgetfixtureinfoÚ_fixtureinfoÚnames_closureÚfixturenamesÚ_initrequest)ro   r^   r[   r²   r³   ÚfmÚfixtureinfor�   s          €rE   rp   zDoctestItem.__init__ü   ss   ø€ ô 	‰Ñ˜˜vÔ&ØˆŒØˆŒ
ð ˆŒØ�\‰\×)Ñ)ˆØ×'Ñ'¨T¸À$Ð'ÓGˆØ'ˆÔØ'×5Ñ5ˆÔØ×ÑÕrG   c               ó*   •— t         ‰| �  ||||¬«      S )zThe public named constructor.)r^   r[   r²   r³   )r   rW   )r±   r[   r^   r²   r³   r�   s        €rE   rW   zDoctestItem.from_parent  s   ø€ ô ‰wÑ"¨°VÀFÐRWÐ"ÓXÐXrG   c                ó6   — i | _         t        | d¬«      | _        y )NT)Ú	_ispytest)Úfuncargsr   Ú_request©ro   s    rE   rº   zDoctestItem._initrequest  s   € Ø+-ˆŒÜ" 4°4Ô8ˆ�rG   c                ó.  — | j                   j                  «        t        | j                   j                  ¬«      }| j                   j                  d«      j	                  «       D ]
  \  }}|||<   Œ | j
                  j                  j                  |«       y )N)Ú
getfixtureÚdoctest_namespace)rÁ   Ú_fillfixturesÚdictÚgetfixturevalueÚitemsr³   ri   Úupdate)ro   ri   r^   Úvalues       rE   ÚsetupzDoctestItem.setup   so   € Ø�‰×#Ñ#Ô%Ü §¡× =Ñ =Ô>ˆØŸ=™=×8Ñ8Ð9LÓM×SÑSÖU‰KˆD�%ØˆE�$ŠKð Và�
‰
×Ñ×Ñ Õ&rG   c                óº   — t        | j                  «       | j                  «        g }| j                  j	                  | j                  |¬«       |rt        |«      ‚y )N)rŽ   )Ú_check_all_skippedr³   Ú$_disable_output_capturing_for_darwinr²   Úrunr}   )ro   r€   s     rE   ÚruntestzDoctestItem.runtest'  sL   € Ü˜4Ÿ:™:Ô&Ø×1Ñ1Ô3Ø13ˆð 	�‰�‰˜Ÿ
™
¨ˆÔ1ÙÜ)¨(Ó3Ð3ð rG   c                óJ  — t        j                  «       dk7  ry| j                  j                  j	                  d«      }|rd|j                  d¬«       |j                  «       \  }}t        j                  j                  |«       t        j                  j                  |«       yy)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)ro   ÚcapmanrŽ   Úerrs       rE   rÏ   z0DoctestItem._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                óà  •— dd l }d }t        |j                  |j                  |j                  f«      r|j                  g}n0t        |j                  t
        «      r|j                  j                  }|€t        ‰| �!  |«      S g }|D �]O  }|j                  }|j                  }|j                  }|j                  €d }	n|j                  |j                  z   dz   }	t        |«      j                  }
t        ||	|
«      }t!        «       }t#        | j$                  j'                  d«      «      }|	�§|j                  j(                  €J ‚|j                  j(                  j+                  d«      }|j                  €J ‚t-        |«      D ��cg c]  \  }}d||j                  z   dz   |fz  ‘Œ }}}|t/        |j                  dz
  d«      |j                  dz    }n=dg}d}|j0                  j+                  «       D ]  }|j3                  d	|› d
|› �«       d}Œ t        ||j                  «      r0||j5                  ||j6                  |«      j9                  d«      z  }nnt;        j<                  |j>                  «      }|d|j                  ›�gz  }|tA        jB                  |j>                  Ž D �cg c]  }|jE                  d«      ‘Œ c}z  }|j3                  ||f«       �ŒR tG        |«      S c c}}w c c}w )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,   ry   r   Ú_get_checkerÚ_get_report_choicerP   rh   Ú	docstringÚ
splitlinesÚ	enumerateÚmaxÚsourcer7   Úoutput_differencer‘   Úsplitr   Úfrom_exc_inforœ   Ú	tracebackÚformat_exceptionÚstriprl   )ro   Úexcinfor“   r€   rn   r’   r�   r�   rç   rè   Úmessageru   rˆ   Úreport_choicerv   ÚiÚxÚindentrr   Úinner_excinfor�   s                       €rE   ræ   z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°f¸gÓFˆLÜ"“nˆGÜ.¨t¯{©{×/DÑ/DÀ_Ó/UÓVˆMØÐ!Ø—|‘|×-Ñ-Ð9Ð9Ð9ØŸ™×.Ñ.×9Ñ9¸%Ó@�à—{‘{Ð.Ð.Ð.äGPÐQVÔGWôÙGW¹V¸aÀ�I  T§[¡[¡°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ô ˜' 7×#9Ñ#9Ô:Ø˜×2Ñ2Ø˜WŸ[™[¨-óç‘%˜“+ñ‘ô !.× ;Ñ ;¸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ññ �ð ×%Ñ% |°UÐ&;Ö<ðS  ôT Ð1Ó2Ð2ùó1ùò(s   Æ!K%Ê'K+c                ób   — | j                   | j                  j                  d| j                  › �fS )Nz
[doctest] )rO   r³   rè   r^   rÂ   s    rE   Ú
reportinfozDoctestItem.reportinfo}  s(   € Ø�y‰y˜$Ÿ*™*×+Ñ+¨z¸$¿)¹)¸Ð-EÐEÐErG   )
r^   r@   r[   úDoctestTextfile | DoctestModuler²   údoctest.DocTestRunnerr³   r£   rw   rx   )
r[   rÿ   r^   r@   r²   r   r³   r£   rw   r!   ©rw   rx   )rö   zExceptionInfo[BaseException]rw   zstr | TerminalRepr)rw   z.tuple[os.PathLike[str] | str, int | None, str])ry   rz   r{   rp   ÚclassmethodrW   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rG   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_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                ó^   — | j                  d«      }t        «       }d}|D ]
  }|||   z  }Œ |S )Nr)   r   )Úgetinir  )rP   Úoptionflags_strÚflag_lookup_tableÚflag_accÚflags        rE   Úget_optionflagsr  ‘  s>   € Ø—m‘mÐ$9Ó:€OÜ(Ó*ÐØ€HÛˆØÐ% dÑ+Ñ+‰ð  à€OrG   c                óR   — | j                  d«      }|r| j                  d«      rd}|S )Nr<   ÚusepdbF)Úgetvalue)rP   r‹   s     rE   Ú_get_continue_on_failurer  š  s/   € Ø &§¡Ð0MÓ NÐÙð �?‰?˜8Ô$Ø"'ÐØÐrG   c                  ó   — e Zd ZdZdd„Zy)rY   Nc              #  ó  K  — dd l }| j                  j                  d«      }| j                  j	                  |«      }t        | j                  «      }| j                  j                  }ddi}t        | j                  «      }t        d|t        «       t        | j                  «      ¬«      } |j                  «       }	|	j                  ||||d«      }
|
j                  r&t        j                  | |
j                  ||
¬«      –— y y ­w)Nr   r.   ry   Ú__main__F©r‰   rŠ   rˆ   r‹   ©r^   r²   r³   )r“   rP   r  rO   Ú	read_textr@   r^   r  r«   ré   r  ÚDocTestParserÚget_doctestÚexamplesr­   rW   )ro   r“   ÚencodingÚtextrç   r^   ri   rŠ   r²   rC   r�   s              rE   r/   zDoctestTextfile.collect§  sâ   è ø€ Ûð —;‘;×%Ñ%Ð&8Ó9ˆØ�y‰y×"Ñ" 8Ó,ˆÜ�t—y‘y“>ˆØ�y‰y�~‰~ˆØ˜ZÐ(ˆä% d§k¡kÓ2ˆäØØ#Ü “NÜ 8¸¿¹Ó Eô	
ˆð '�×&Ñ&Ó(ˆØ×!Ñ! $¨¨t°X¸qÓAˆØ�=Š=Ü×)Ñ)Ø˜4Ÿ9™9¨V¸4ð *ó ó ð ùs   ‚DD©rw   zIterable[DoctestItem])ry   rz   r{   r´   r/   rK   rG   rE   rY   rY   ¤  s   „ Ø
€CôrG   rY   c                óf   ‡— ddl Št        ˆfd„| j                  D «       «      }|rt        d«       yy)zVRaise pytest.skip() if all examples in the given DocTest have the SKIP
    option set.r   Nc              3  ój   •K  — | ]*  }|j                   j                  ‰j                  d «      –— Œ, y­w)FN)ÚoptionsÚgetÚSKIP)rc   rú   r“   s     €rE   re   z%_check_all_skipped.<locals>.<genexpr>È  s%   øè ø€ ÐPÁ-¸Q�a—i‘i—m‘m G§L¡L°%×8Á-ùs   ƒ03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                ó    — 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    rE   Ú
_is_mockedr1  Í  s   € ô 	�SÐMÈtÓTØð	ðrG   c               #  ó    ‡K  — t         j                  Šddœ	 	 	 	 	 dˆfd„} | t         _        	 d–— ‰t         _        y# ‰t         _        w xY w­w)z€Context manager which replaces ``inspect.unwrap`` with a version
    that's aware of mock objects and doesn't recurse into them.N©Ústopc               óÀ   •‡ ‡— 	 |�|t         u r ‰‰ t         ¬«      S |Š ‰‰ ˆˆ fd„¬«      S # t        $ r'}t        j                  d|›d‰ ›d�t        «       ‚ d }~ww xY w)Nr3  c                ó.   •— t        | «      xs  ‰‰«      S rI   )r1  )r´   Ú_stopr°   s    €€rE   Ú<lambda>zF_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)r1  Ú	ExceptionÚwarningsÚwarnr    )r°   r4  Úer7  Úreal_unwraps   `  @€rE   Ú_mock_aware_unwrapz4_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]r4  zCallable[[Any], Any] | Nonerw   r   )ÚinspectÚunwrap)r>  r=  s    @rE   Ú_patch_unwrap_mock_awarerA  Ö  sU   øè ø€ ô —.‘.€Kð JNñØ ðØ+Fðà	õð" („G„Nð%Ûà$Œ�ø˜Œ�üs   ƒ*A®> ²A¾AÁAc                  ó   — e Zd Zdd„Zy)rV   c              #  ór  K  — dd l } G d„ d|j                  «      }	 | j                  }| j                  j                  j                  | «        |«       }t        | j
                  «      }t        d|t        «       t        | j
                  «      ¬«      }|j!                  |j"                  «      D ]4  }|j$                  sŒt&        j)                  | |j*                  ||¬«      –— Œ6 y # t        j                  $ r9 | j
                  j                  d«      rt        d| j                  ›�«       n‚ Y �Œ
w xY w­w)	Nr   c                  ó0  ‡ — e Zd Zej                  dd Zedk  xsB edk(  xr ej                  j                  dk  xs  edk(  xr ej                  j                  dk  Zerˆ fd„Zej                  dk  r	 	 dˆ fd	„Z	ej                  d
k  r	ˆ fd„Z
ˆ xZS ˆ xZS )ú5DoctestModule.collect.<locals>.MockAwareDocTestFinderNé   )é   é   rã   )rG  é   rG  c                ó    •— t        |t        «      rt        |d|«      }t        |d«      rt	        j
                  |«      }t        ‰| �  ||«      S )a%  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Úhasattrr?  r@  r   Ú_find_lineno)ro   r´   Úsource_linesr�   s      €rE   rP  zBDoctestModule.collect.<locals>.MockAwareDocTestFinder._find_lineno  sO   ø€ ô " #¤xÔ0Ü% c¨6°3Ó7˜ä˜s MÔ2ä%Ÿn™n¨SÓ1˜ô !™7Ñ/ØØ$óð rG   )rG  é
   c           
     ó†   •— t        |«      ryt        «       5  t        ‰| �  |||||||«       ddd«       y# 1 sw Y   yxY w)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)r1  rA  r   Ú_find)	ro   Útestsr´   r^   ÚmodulerQ  ri   Úseenr�   s	           €rE   rT  z;DoctestModule.collect.<locals>.MockAwareDocTestFinder._find  s<   ø€ ô " #”ØÜ1Õ3ä™™Ø! 3¨¨f°lÀEÈ4ô÷ 4×3Ñ3ús	   ˜7·A )rG  é   c                óp   •— 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
                    )r—   Ú	functoolsÚcached_propertyr°   r   Ú_from_module)ro   rV  Úobjectr�   s      €rE   r\  zBDoctestModule.collect.<locals>.MockAwareDocTestFinder._from_module)  s2   ø€ ô " &¬)×*CÑ*CÔDØ!'§¡˜ô !™7Ñ/°¸Ó?Ð?rG   r  )ry   rz   r{   rÜ   Úversion_infoÚpy_ver_info_minorÚmicroÚis_find_lineno_brokenrP  rT  r\  r‚   rƒ   s   @rE   ÚMockAwareDocTestFinderrE  ø  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   rb  r;   zunable to import module Fr  r   )r“   ÚDocTestFinderr´   r   ÚCollectErrorrP   r  r   rO   rf   rµ   Úparsefactoriesr  r«   ré   r  Úfindry   r$  r­   rW   r^   )ro   r“   rb  rV  ÚfinderrŠ   r²   r�   s           rE   r/   zDoctestModule.collectõ  s  è ø€ Ûô;	@ W×%:Ñ%:ô ;	@ðz	Ø—X‘XˆFð 	�‰×$Ñ$×3Ñ3°DÔ9ñ (Ó)ˆÜ% d§k¡kÓ2ˆÜØØ#Ü “NÜ 8¸¿¹Ó Eô	
ˆð —K‘K ¨¯©Ö8ˆDØ�}‹}Ü!×-Ñ-Ø˜tŸy™y°¸tð .ó ó ñ 9øô) ×%Ñ%ò 	Ø�{‰{×#Ñ#Ð$BÔCÜÐ/°·	±	¨}Ð=Õ>àò ?ð	üs/   ‚D7�C( ©BD7Ã (D7Ã(AD4Ä0D7Ä3D4Ä4D7Nr'  )ry   rz   r{   r/   rK   rG   rE   rV   rV   ô  s   „ ôZrG   rV   c                 óF   ‡— dd l } dd lŠ G ˆfd„d| j                  «      }|S )Nr   c                  óà   •‡ — e Zd ZW °j                  dW °j                  «      ZW °j                  dW °j                  «      ZW °j                  dW °j                  «      Zdˆ ˆfd„Z	d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+)
              )
            )
            c                óz  •— t         ‰| �  |||«      ry|t        «       z  }|t        «       z  }|t	        «       z  }|s|s|sydˆ	fd„}|r& || j
                  |«      } || j
                  |«      }|r& || j                  |«      } || j                  |«      }|r| j                  ||«      }t         ‰| �  |||«      S )NTFc                ó*   •— ‰j                  | d|«      S )Nz\1\2)Úsub)ÚregexÚtxtÚres     €rE   Úremove_prefixeszX_init_checker_class.<locals>.LiteralsOutputChecker.check_output.<locals>.remove_prefixes  s   ø€ Ø—v‘v˜e W¨cÓ2Ð2rG   )rn  zPattern[str]ro  r@   rw   r@   )r   Úcheck_outputr  r  r  Ú_unicode_literal_reÚ_bytes_literal_reÚ_remove_unwanted_precision)
ro   Úwantr‘   rŠ   Úallow_unicodeÚallow_bytesÚallow_numberrq  r�   rp  s
           €€rE   rr  z?_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¸CÓ@�ä‘7Ñ'¨¨c°;Ó?Ð?rG   c                ó.  — t        | j                  j                  |«      «      }t        | j                  j                  |«      «      }t        |«      t        |«      k7  r|S d}t	        ||«      D �]!  \  }}|j                  d«      }|j                  d«      }	|	€|j                  d«      }	|€dn
t        |«      }
|	�|
t        |	«      z  }
t        |j                  «       «      t        t        |j                  «       «      d|
 z  ¬«      k(  sŒž|d |j                  «       |z    |j                  «       z   ||j                  «       |z   d  z   }||j                  «       |j                  «       z
  |j                  «       |j                  «       z
  z
  z  }�Œ$ |S )Nr   ÚfractionÚ	exponent1Ú	exponent2rR  )Úabs)ÚlistÚ
_number_reÚfinditerÚlenÚziprD   r¡   Úfloatr   ÚstartÚend)ro   rv  r‘   ÚwantsÚgotsÚoffsetÚwÚgr{  ÚexponentÚ	precisions              rE   ru  zM_init_checker_class.<locals>.LiteralsOutputChecker._remove_unwanted_precision�  s\  € Ü˜Ÿ™×1Ñ1°$Ó7Ó8ˆEÜ˜Ÿ™×0Ñ0°Ó5Ó6ˆDÜ�5‹zœS ›YÒ&Ø�
ØˆFÜ˜E 4×(‘��1Ø'(§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Ñ=ÀÀAÇEÁEÃGÈfÑDTÐDVÐ@WÑWð ð ˜aŸe™e›g¨¯©«	Ñ1°Q·U±U³W¸q¿w¹w»yÑ5HÑIÑI’Fð )ð  ˆJrG   )rv  r@   r‘   r@   rŠ   r¡   rw   r¢   )rv  r@   r‘   r@   rw   r@   )ry   rz   r{   ÚcompileÚUNICODErs  rt  ÚVERBOSEr€  rr  ru  r‚   )r�   rp  s   @€rE   ÚLiteralsOutputCheckerrj  V  sX   ù„ ñ
 !Ÿj™jÐ)CÁRÇZÁZÓPÐÙŸJ™JÐ'AÁ2Ç:Á:ÓNÐÙ—Z‘Zðñ& �J‰Jó)
ˆ
ö.	@÷6	rG   r‘  )r“   rp  ÚOutputChecker)r“   r‘  rp  s     @rE   Ú_init_checker_classr“  R  s&   ø€ ÛÛöO × 5Ñ 5ô Oðb !Ð rG   c                 ó6   — 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“  rK   rG   rE   ré   ré   ª  s   € ô ÐÜ+Ó-ˆÜ‹?ÐrG   c                 ó.   — ddl }  | j                  d«      S )z+Register and return the ALLOW_UNICODE flag.r   Nr	  ©r“   Úregister_optionflagr  s    rE   r  r  ¾  s   € ãà&ˆ7×&Ñ& Ó7Ð7rG   c                 ó.   — ddl }  | j                  d«      S )z)Register and return the ALLOW_BYTES flag.r   Nr
  r–  r  s    rE   r  r  Å  s   € ãà&ˆ7×&Ñ& }Ó5Ð5rG   c                 ó.   — ddl }  | j                  d«      S )z$Register and return the NUMBER flag.r   Nr  r–  r  s    rE   r  r  Ì  s   € ãà&ˆ7×&Ñ& xÓ0Ð0rG   c           
     ó    — ddl }t        |j                  t        |j                  t
        |j                  t        |j                  t        di|    S )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   rf   )Ú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Ç   rK   rG   rE   rÅ   rÅ   ä  s   € ô ‹6€MrG   )rC   r   rw   rx   r  )rZ   r   r[   r   rw   z&DoctestModule | DoctestTextfile | None)rO   r   rw   r¢   )rP   r   rO   r   r[   r   rw   r¢   )rw   ztype[doctest.DocTestRunner]rž   )
rˆ   rŸ   r‰   r    rŠ   r¡   r‹   r¢   rw   r   )rw   zdict[str, int])rP   r   rw   r¡   )rP   r   rw   r¢   )r�   r£   rw   rx   )r´   r]  rw   r¢   )rw   zGenerator[None])rw   ztype[doctest.OutputChecker])rw   zdoctest.OutputChecker)rw   r¡   )r¤  r@   rw   r¡   )rw   zdict[str, Any])^r¥   Ú
__future__r   r˜   Ú
contextlibr   rZ  r?  ÚosÚpathlibr   rÖ   rÜ   ró   ÚtypesÚtypingr   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   Ú_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   rl   r9  r}   r¨   r«   r­   r  r  r  rY   rÎ   r1  rA  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   