ó
    áÅŸgx‡  ã            	      óž  • S 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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Jr  \(       a  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   r.SSS  jr/STS! jr0SUS" jr1\ " S#S$9SVS% j5       r2 " S& S'\Rf                  5      r4 " S( S)\Rf                  5      r5 " S* S+\55      r6 " S, S-\5      r7 " S. S/\Rp                  \\   5      r9S0S1S2S3.r: " S4 S5\9\;   5      r< " S6 S7\9\   5      r= " S8 S9\=\>   5      r? " S: S;\=\;   5      r@ " S< S=\9\   5      rA " S> S?\A\>   5      rB " S@ SA\A\;   5      rC\	Rˆ                  SB:¼  d  \(       a  \ " SC SD\\\   5      5       rEO" " SE SD\RŒ                  " SDSFSG/5      \\   5      rE " SH SI\\   5      rGSWSJ jrH " SK SL5      rI " SM SN\\   5      rJ\&SXSO j5       rK\&SYSP j5       rL\&SXSQ j5       rM\&SYSR j5       rNg)Zz+Per-test stdout/stderr capturing mechanism.é    )ÚannotationsN©ÚUnsupportedOperation)ÚTemporaryFile)ÚTracebackType)ÚAny)ÚAnyStr)ÚBinaryIO)ÚFinal)Úfinal)Ú	Generator)ÚGeneric)ÚIterable)ÚIterator)ÚLiteral)Ú
NamedTuple)ÚTextIO)ÚTYPE_CHECKING)ÚSelf)ÚConfig)Úhookimpl)ÚParser)Úcheck_ispytest)Úfixture)Ú
SubRequest)Ú	Collector)ÚFile)ÚItem)ÚCollectReport©ÚfdÚsysÚnoútee-sysc           	     óx   • U R                  S5      nUR                  SSSS/ SQSS9  UR                  S	S
SSSS9  g )NÚgeneralz	--captureÚstorer!   Úmethodr    z3Per-test capturing method: one of fd|sys|no|tee-sys)ÚactionÚdefaultÚmetavarÚchoicesÚhelpz-sÚstore_constr#   ÚcapturezShortcut for --capture=no)r)   ÚconstÚdestr-   )ÚgetgroupÚ
_addoption)ÚparserÚgroups     ÚP/var/www/blue/EV-Temp_rev04/venv/lib/python3.13/site-packages/_pytest/capture.pyÚpytest_addoptionr7   0   sY   € Ø�O‰O˜IÓ&€EØ	×ÑØØØØÚ.ØBð ñ ð 
×ÑØØØØØ(ð ò ó    c                 óx   • [         R                  R                  S5      (       a   SSKn gg! [         a     gf = f)zøEnsure colorama is imported so that it attaches to the correct stdio
handles on Windows.

colorama uses the terminal on import time. So if something does the
first import of colorama while I/O capture is active, colorama will
fail in various ways.
Úwin32r   N)r"   ÚplatformÚ
startswithÚcoloramaÚImportError)r=   s    r6   Ú_colorama_workaroundr?   C   s:   € ô ‡|�|×Ñ˜w×'Ñ'ð	Üð (øô ó 	Ùð	ús   ¦, ¬
9¸9c                ó$  ^ • [         R                  R                  S5      (       a  [        [         S5      (       a  g[        T S5      (       d  g[        T R                  S5      (       a  T R                  R
                  OT R                  n[        U[        R                  5      (       d  gU 4S jnU" [         R                  S5      [         l	        U" [         R                  S5      [         l
        U" [         R                  S5      [         l        g)	aµ  Workaround for Windows Unicode console handling.

Python 3.6 implemented Unicode console handling for Windows. This works
by reading/writing to the raw console handle using
``{Read,Write}ConsoleW``.

The problem is that we are going to ``dup2`` over the stdio file
descriptors when doing ``FDCapture`` and this will ``CloseHandle`` the
handles used by Python to write to the console. Though there is still some
weirdness and the console handle seems to only be closed randomly and not
on the first call to ``CloseHandle``, or maybe it gets reopened with the
same handle value when we suspend capturing.

The workaround in this case will reopen stdio with a different fd which
also means a different handle by replicating the logic in
"Py_lifecycle.c:initstdio/create_stdio".

:param stream:
    In practice ``sys.stdout`` or ``sys.stderr``, but given
    here as parameter for unittesting purposes.

See https://github.com/pytest-dev/py/issues/103.
r:   Úpypy_version_infoNÚbufferÚrawc                ó2  >• [        TR                  S5      (       d  US   S:X  a  SnOSn[        R                  " [	        [
        R                  " U R                  5       5      X5      U R                  U R                  U R                  U R                  5      $ )NrC   r   Úwéÿÿÿÿ)ÚhasattrrB   ÚioÚTextIOWrapperÚopenÚosÚdupÚfilenoÚencodingÚerrorsÚnewlinesÚline_buffering)ÚfÚmodeÚ	bufferingÚstreams      €r6   Ú_reopen_stdioÚ3_windowsconsoleio_workaround.<locals>._reopen_stdiov   sr   ø€ Ü�v—}‘} e×,Ñ,°°a±¸C³Ø‰IàˆIä×ÒÜ”—’˜Ÿ™›
Ó# TÓ5Ø�J‰JØ�H‰HØ�J‰JØ×Ñó
ð 	
r8   ÚrbÚwb)r"   r;   r<   rG   rB   rC   Ú
isinstancerH   Ú_WindowsConsoleIOÚstdinÚstdoutÚstderr)rU   Ú
raw_stdoutrV   s   `  r6   Ú_windowsconsoleio_workaroundr`   R   s´   ø€ ô0 �<‰<×"Ñ" 7×+Ñ+¬w´sÐ<O×/PÑ/PØô �6˜8×$Ñ$Øä&-¨f¯m©m¸U×&CÑ&C�—‘×"Ò"ÈÏÉ€Jä�j¤"×"6Ñ"6×7Ñ7Øõ
ñ œcŸi™i¨Ó.„C„IÙœsŸz™z¨4Ó0„C„JÙœsŸz™z¨4Ó0„C…Jr8   T©Úwrapperc              #  óZ  #   • U R                   nUR                  S:X  a  [        [        R                  5        [        5         U R                  n[        UR                  5      nUR                  US5        U R                  UR                  5        UR                  5           S v •  UR                  5         g ! UR                  5         f = f! [         aR    UR                  5       u  pE[        R                  R                  U5        [        R                   R                  U5        e f = f7f)Nr!   Úcapturemanager)Úknown_args_namespacer/   r`   r"   r]   r?   ÚpluginmanagerÚCaptureManagerÚregisterÚadd_cleanupÚstop_global_capturingÚstart_global_capturingÚsuspend_global_captureÚBaseExceptionÚread_global_captureÚwriter^   )Úearly_configÚnsrf   ÚcapmanÚoutÚerrs         r6   Úpytest_load_initial_conftestsru   ‰   sæ   é € à	×	*Ñ	*€BØ	‡z�z�TÓÜ$¤S§Z¡ZÔ0ÜÔØ ×.Ñ.€MÜ˜BŸJ™JÓ'€FØ×Ñ˜6Ð#3Ô4ð ×Ñ˜V×9Ñ9Ô:ð ×!Ñ!Ô#ð	ð	,Ûà×)Ñ)Õ+øˆF×)Ñ)Õ+ûÜó Ø×-Ñ-Ó/‰ˆÜ�
‰
×Ñ˜ÔÜ�
‰
×Ñ˜ÔØð	üs1   ‚BD+Â"B7 Â&C Â6D+Â7C	Ã	C ÃAD(Ä(D+c                  ó@   • \ rS rSrSr\SS j5       r\SS j5       rSrg)ÚEncodedFileé§   © c                ó,   • [        U R                  5      $ ©N)ÚreprrB   ©Úselfs    r6   ÚnameÚEncodedFile.nameª   s   € ô �D—K‘KÓ Ð r8   c                óN   • U R                   R                  R                  SS5      $ )NÚbÚ )rB   rS   Úreplacer}   s    r6   rS   ÚEncodedFile.mode°   s!   € ð �{‰{×Ñ×'Ñ'¨¨RÓ0Ð0r8   N©ÚreturnÚstr)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú	__slots__Úpropertyr   rS   Ú__static_attributes__ry   r8   r6   rw   rw   §   s-   † Ø€Iàó!ó ð!ð
 ó1ó ó1r8   rw   c                  ó6   ^ • \ rS rSrSU 4S jjrSS jrSrU =r$ )Ú	CaptureIOé·   c                óL   >• [         TU ]  [        R                  " 5       SSSS9  g )NúUTF-8rƒ   T)rN   ÚnewlineÚwrite_through)ÚsuperÚ__init__rH   ÚBytesIO)r~   Ú	__class__s    €r6   r˜   ÚCaptureIO.__init__¸   s    ø€ Ü‰ÑœŸš›°ÀÐSWÐÒXr8   c                óª   • [        U R                  [        R                  5      (       d   eU R                  R	                  5       R                  S5      $ )Nr”   )rZ   rB   rH   r™   ÚgetvalueÚdecoder}   s    r6   r�   ÚCaptureIO.getvalue»   s;   € Ü˜$Ÿ+™+¤r§z¡z×2Ñ2Ð2Ð2Ø�{‰{×#Ñ#Ó%×,Ñ,¨WÓ5Ð5r8   ry   ©r‡   ÚNoner†   )r‰   rŠ   r‹   rŒ   r˜   r�   r�   Ú__classcell__©rš   s   @r6   r‘   r‘   ·   s   ø† ÷Y÷6ò 6r8   r‘   c                  ó<   ^ • \ rS rSrSU 4S jjrSU 4S jjrSrU =r$ )ÚTeeCaptureIOéÀ   c                ó.   >• Xl         [        TU ]	  5         g r{   )Ú_otherr—   r˜   )r~   Úotherrš   s     €r6   r˜   ÚTeeCaptureIO.__init__Á   s   ø€ ØŒÜ‰ÑÕr8   c                óX   >• [         TU ]  U5        U R                  R                  U5      $ r{   )r—   ro   r¨   )r~   Úsrš   s     €r6   ro   ÚTeeCaptureIO.writeÅ   s$   ø€ Ü‰‰�aÔØ�{‰{× Ñ  Ó#Ð#r8   )r¨   )r©   r   r‡   r¡   )r¬   rˆ   r‡   Úint)r‰   rŠ   r‹   rŒ   r˜   ro   r�   r¢   r£   s   @r6   r¥   r¥   À   s   ø† ÷÷$õ $r8   r¥   c                  ó  • \ rS rSr\SS j5       rSSS jjr\rSS jrSSS jjr	SS jr
SS jrSS jrSS	 jrSS
 jrSS jrS S!S jjrSS jrSS jrS"S#S jjrS$S jrS%S jrSS jrS&S jr        S'S jr\S(S j5       rSrg))ÚDontReadFromInputéÊ   c                ó\   • [         R                  c   e[         R                  R                  $ r{   )r"   Ú	__stdin__rN   r}   s    r6   rN   ÚDontReadFromInput.encodingË   s"   € ä�}‰}Ñ(Ð(Ð(Ü�}‰}×%Ñ%Ð%r8   c                ó   • [        S5      e©NzJpytest: reading from stdin while output is captured!  Consider using `-s`.©ÚOSError©r~   Úsizes     r6   ÚreadÚDontReadFromInput.readÐ   ó   € ÜØXó
ð 	
r8   c                ó"   • U R                  5       $ r{   )Úreadliner}   s    r6   Ú__next__ÚDontReadFromInput.__next__×   s   € Ø�}‰}‹Ðr8   c                ó   • [        S5      er¶   r·   )r~   Úhints     r6   Ú	readlinesÚDontReadFromInput.readlinesÚ   r½   r8   c                ó   • U $ r{   ry   r}   s    r6   Ú__iter__ÚDontReadFromInput.__iter__ß   ó   € Øˆr8   c                ó   • [        S5      e)Nz/redirected stdin is pseudofile, has no fileno()r   r}   s    r6   rM   ÚDontReadFromInput.filenoâ   s   € Ü"Ð#TÓUÐUr8   c                ó   • [        S5      e)Nz.redirected stdin is pseudofile, has no flush()r   r}   s    r6   ÚflushÚDontReadFromInput.flushå   s   € Ü"Ð#SÓTÐTr8   c                ó   • g©NFry   r}   s    r6   ÚisattyÚDontReadFromInput.isattyè   ó   € Ør8   c                ó   • g r{   ry   r}   s    r6   ÚcloseÚDontReadFromInput.closeë   ó   € Ør8   c                ó   • grÐ   ry   r}   s    r6   ÚreadableÚDontReadFromInput.readableî   rÓ   r8   c                ó   • [        S5      e)Nz0redirected stdin is pseudofile, has no seek(int)r   )r~   ÚoffsetÚwhences      r6   ÚseekÚDontReadFromInput.seekñ   s   € Ü"Ð#UÓVÐVr8   c                ó   • grÐ   ry   r}   s    r6   ÚseekableÚDontReadFromInput.seekableô   rÓ   r8   c                ó   • [        S5      e)Nz-redirected stdin is pseudofile, has no tell()r   r}   s    r6   ÚtellÚDontReadFromInput.tell÷   s   € Ü"Ð#RÓSÐSr8   Nc                ó   • [        S5      e)Nzcannot truncate stdinr   r¹   s     r6   ÚtruncateÚDontReadFromInput.truncateú   ó   € Ü"Ð#:Ó;Ð;r8   c                ó   • [        S5      e)Nzcannot write to stdinr   ©r~   Údatas     r6   ro   ÚDontReadFromInput.writeý   ré   r8   c                ó   • [        S5      e)NzCannot write to stdinr   )r~   Úliness     r6   Ú
writelinesÚDontReadFromInput.writelines   ré   r8   c                ó   • grÐ   ry   r}   s    r6   ÚwritableÚDontReadFromInput.writable  rÓ   r8   c                ó   • U $ r{   ry   r}   s    r6   Ú	__enter__ÚDontReadFromInput.__enter__  rÉ   r8   c                ó   • g r{   ry   )r~   ÚtypeÚvalueÚ	tracebacks       r6   Ú__exit__ÚDontReadFromInput.__exit__	  s   € ð 	r8   c                ó   • U $ r{   ry   r}   s    r6   rB   ÚDontReadFromInput.buffer  s	   € ð ˆr8   ry   r†   )rF   )rº   r®   r‡   rˆ   )rÃ   ú
int | Noner‡   z	list[str])r‡   zIterator[str])r‡   r®   r    ©r‡   Úbool)r   )rÜ   r®   rÝ   r®   r‡   r®   r{   )rº   r   r‡   r®   )rì   rˆ   r‡   r®   )rï   zIterable[str]r‡   r¡   )r‡   r   )rù   ztype[BaseException] | Nonerú   zBaseException | Nonerû   zTracebackType | Noner‡   r¡   )r‡   r
   )r‰   rŠ   r‹   rŒ   rŽ   rN   r»   r¿   rÀ   rÄ   rÇ   rM   rÍ   rÑ   rÕ   rÙ   rÞ   rá   rä   rç   ro   rð   ró   rö   rü   rB   r�   ry   r8   r6   r°   r°   Ê   s³   † Øó&ó ð&ö
ð
 €Hôö
ô
ôVôUôôôöWôôTö<ô<ô<ôôðà(ðð $ðð (ð	ð
 
ôð óó ór8   r°   c                  ó8  • \ rS rSr% S\S'   \R                  SS j5       r\R                  SS j5       r\R                  SS j5       r	\R                  SS j5       r
\R                  SS j5       r\R                  SS	 j5       r\R                  SS
 j5       rSrg)ÚCaptureBasei  r	   ÚEMPTY_BUFFERc                ó   • [        5       er{   ©ÚNotImplementedError©r~   r!   s     r6   r˜   ÚCaptureBase.__init__  ó   € ä!Ó#Ð#r8   c                ó   • [        5       er{   r  r}   s    r6   ÚstartÚCaptureBase.start!  r  r8   c                ó   • [        5       er{   r  r}   s    r6   ÚdoneÚCaptureBase.done%  r  r8   c                ó   • [        5       er{   r  r}   s    r6   ÚsuspendÚCaptureBase.suspend)  r  r8   c                ó   • [        5       er{   r  r}   s    r6   ÚresumeÚCaptureBase.resume-  r  r8   c                ó   • [        5       er{   r  rë   s     r6   ÚwriteorgÚCaptureBase.writeorg1  r  r8   c                ó   • [        5       er{   r  r}   s    r6   ÚsnapÚCaptureBase.snap5  r  r8   ry   N©r!   r®   r‡   r¡   r    )rì   r	   r‡   r¡   )r‡   r	   )r‰   rŠ   r‹   rŒ   Ú__annotations__ÚabcÚabstractmethodr˜   r  r  r  r  r  r  r�   ry   r8   r6   r  r    s¼   ‡ ØÓà×Ñó$ó ð$ð 	×Ñó$ó ð$ð 	×Ñó$ó ð$ð 	×Ñó$ó ð$ð 	×Ñó$ó ð$ð 	×Ñó$ó ð$ð 	×Ñó$ó ó$r8   r  r\   r]   r^   )r   é   é   c                  ó^   • \ rS rSrSrSS jrSS jrSS jrSS jrSS jr	SS jr
SS	 jrS
rg)Ú	NoCapturei=  rƒ   c                ó   • g r{   ry   r	  s     r6   r˜   ÚNoCapture.__init__@  r×   r8   c                ó   • g r{   ry   r}   s    r6   r  ÚNoCapture.startC  r×   r8   c                ó   • g r{   ry   r}   s    r6   r  ÚNoCapture.doneF  r×   r8   c                ó   • g r{   ry   r}   s    r6   r  ÚNoCapture.suspendI  r×   r8   c                ó   • g r{   ry   r}   s    r6   r  ÚNoCapture.resumeL  r×   r8   c                ó   • g©Nrƒ   ry   r}   s    r6   r  ÚNoCapture.snapO  s   € Ør8   c                ó   • g r{   ry   rë   s     r6   r  ÚNoCapture.writeorgR  r×   r8   ry   Nr  r    r†   ©rì   rˆ   r‡   r¡   )r‰   rŠ   r‹   rŒ   r  r˜   r  r  r  r  r  r  r�   ry   r8   r6   r%  r%  =  s*   † Ø€Lôôôôôô÷r8   r%  c                  ó€   • \ rS rSr SSS.       SS jjjrSS jrSS jrSS jrSS	 jrSS
 jr	SS jr
SS jrSrg)ÚSysCaptureBaseiV  NF©Úteec               óÚ   • [         U   n[        [        U5      U l        X@l        Uc7  US:X  a  [        5       nO&U(       d
  [        5       O[        U R                  5      nX l        SU l	        g )Nr\   Úinitialized)
ÚpatchsysdictÚgetattrr"   Ú_oldr   r°   r‘   r¥   ÚtmpfileÚ_state)r~   r!   r?  r9  r   s        r6   r˜   ÚSysCaptureBase.__init__W  sU   € ô ˜BÑˆÜ#¤C¨Ó.ˆŒ	ØŒ	Ø‰?Ø�w‹Ü+Ó-‘æ-0œ)œ+´lÀ4Ç9Á9Ó6M�ØŒØ#ˆ�r8   c                óÆ   • SR                  UU R                  [        U S5      =(       a    [        U R                  5      =(       d    SU R
                  U R                  5      $ ©Nz(<{} {} _old={} _state={!r} tmpfile={!r}>r>  z<UNSET>)Úformatr   rG   r|   r>  r@  r?  )r~   Ú
class_names     r6   r|   ÚSysCaptureBase.repre  sI   € Ø9×@Ñ@ØØ�I‰IÜ�D˜&Ó!×5¤d¨4¯9©9£o×B¸Ø�K‰KØ�L‰Ló
ð 	
r8   c                óî   • SR                  U R                  R                  U R                  [	        U S5      =(       a    [        U R                  5      =(       d    SU R                  U R                  5      $ rC  )	rD  rš   r‰   r   rG   r|   r>  r@  r?  r}   s    r6   Ú__repr__ÚSysCaptureBase.__repr__n  sS   € Ø9×@Ñ@Ø�N‰N×#Ñ#Ø�I‰IÜ�D˜&Ó!×5¤d¨4¯9©9£o×B¸Ø�K‰KØ�L‰Ló
ð 	
r8   c                ó„   • U R                   U;   d0   SR                  XR                   SR                  U5      5      5       eg ©Nz+cannot {} in state {!r}: expected one of {}z, ©r@  rD  Újoin©r~   ÚopÚstatess      r6   Ú_assert_stateÚSysCaptureBase._assert_statew  ó;   € à�K‰K˜6Ó!ð	
à8×?Ñ?Ø—‘˜TŸY™Y vÓ.ó
ó	
Ù!r8   c                ó€   • U R                  SS5        [        [        U R                  U R                  5        SU l        g )Nr  ©r;  Ústarted)rQ  Úsetattrr"   r   r?  r@  r}   s    r6   r  ÚSysCaptureBase.start~  s.   € Ø×Ñ˜7Ð$4Ô5Ü”�T—Y‘Y §¡Ô-Øˆ�r8   c                óÚ   • U R                  SS5        U R                  S:X  a  g [        [        U R                  U R
                  5        U ?U R                  R                  5         SU l        g )Nr  ©r;  rV  Ú	suspendedr  )rQ  r@  rW  r"   r   r>  r?  rÕ   r}   s    r6   r  ÚSysCaptureBase.doneƒ  sR   € Ø×Ñ˜6Ð#RÔSØ�;‰;˜&Ó ØÜ”�T—Y‘Y §	¡	Ô*ØˆIØ�‰×ÑÔØˆ�r8   c                ó€   • U R                  SS5        [        [        U R                  U R                  5        SU l        g ©Nr  ©rV  r[  r[  )rQ  rW  r"   r   r>  r@  r}   s    r6   r  ÚSysCaptureBase.suspendŒ  s.   € Ø×Ñ˜9Ð&>Ô?Ü”�T—Y‘Y §	¡	Ô*Ø!ˆ�r8   c                ó¢   • U R                  SS5        U R                  S:X  a  g [        [        U R                  U R
                  5        SU l        g ©Nr  r_  rV  )rQ  r@  rW  r"   r   r?  r}   s    r6   r  ÚSysCaptureBase.resume‘  s=   € Ø×Ñ˜8Ð%=Ô>Ø�;‰;˜)Ó#ØÜ”�T—Y‘Y §¡Ô-Øˆ�r8   )r>  r@  r   r?  r{   )r!   r®   r?  zTextIO | Noner9  r  r‡   r¡   )rE  rˆ   r‡   rˆ   r†   ©rO  rˆ   rP  ztuple[str, ...]r‡   r¡   r    )r‰   rŠ   r‹   rŒ   r˜   r|   rH  rQ  r  r  r  r  r�   ry   r8   r6   r7  r7  V  sU   † à04ð$ØEJñ$Øð$Ø -ð$Ø>Bð$à	ö$ô
ô
ô
ô ô
ô"÷
 r8   r7  c                  ó,   • \ rS rSrSrSS jrSS jrSrg)	ÚSysCaptureBinaryi™  r8   c                ó  • U R                  SS5        U R                  R                  S5        U R                  R                  R	                  5       nU R                  R                  S5        U R                  R                  5         U$ ©Nr  r_  r   ©rQ  r?  rÞ   rB   r»   rç   ©r~   Úress     r6   r  ÚSysCaptureBinary.snapœ  ód   € Ø×Ñ˜6Ð#;Ô<Ø�‰×Ñ˜!ÔØ�l‰l×!Ñ!×&Ñ&Ó(ˆØ�‰×Ñ˜!ÔØ�‰×ÑÔØˆ
r8   c                óî   • U R                  SS5        U R                  R                  5         U R                  R                  R	                  U5        U R                  R                  R                  5         g ©Nr  r_  )rQ  r>  rÍ   rB   ro   rë   s     r6   r  ÚSysCaptureBinary.writeorg¤  sO   € Ø×Ñ˜:Ð'?Ô@Ø�	‰	�‰ÔØ�	‰	×Ñ×Ñ˜tÔ$Ø�	‰	×Ñ×ÑÕ r8   ry   N©r‡   Úbytes©rì   rr  r‡   r¡   ©r‰   rŠ   r‹   rŒ   r  r  r  r�   ry   r8   r6   rf  rf  ™  s   † Ø€Lô÷!r8   rf  c                  ó,   • \ rS rSrSrSS jrSS jrSrg)	Ú
SysCapturei«  rƒ   c                ó
  • U R                  SS5        [        U R                  [        5      (       d   eU R                  R	                  5       nU R                  R                  S5        U R                  R                  5         U$ rh  )rQ  rZ   r?  r‘   r�   rÞ   rç   rj  s     r6   r  ÚSysCapture.snap®  sc   € Ø×Ñ˜6Ð#;Ô<Ü˜$Ÿ,™,¬	×2Ñ2Ð2Ð2Ø�l‰l×#Ñ#Ó%ˆØ�‰×Ñ˜!ÔØ�‰×ÑÔØˆ
r8   c                ó’   • U R                  SS5        U R                  R                  U5        U R                  R                  5         g ro  )rQ  r>  ro   rÍ   rë   s     r6   r  ÚSysCapture.writeorg¶  s1   € Ø×Ñ˜:Ð'?Ô@Ø�	‰	�‰˜ÔØ�	‰	�‰Õr8   ry   Nr†   r5  rt  ry   r8   r6   rv  rv  «  s   † Ø€Lô÷r8   rv  c                  óZ   • \ rS rSrSS jrSS jrSS jrSS jrSS jrSS jr	SS jr
S	rg
)ÚFDCaptureBasei¼  c                óh  • Xl          [        R                  " U5        S U l        [        R                  " U5      U l
        US:X  a.  [        [        R                  SS9U l        [        U5      U l        ON[        [        SS9SSSSS9U l        U[         ;   a  [        XR                  5      U l        O[#        U5      U l        S	U l        g ! [         a]    [        R
                  " [        R                  [        R                  5      U l        [        R                  " U R                  U5         GNf = f)
Nr   úutf-8)rN   )rT   r„   rƒ   T)rN   rO   r•   r–   r;  )ÚtargetfdrK   ÚfstatÚtargetfd_invalidr¸   rJ   ÚdevnullÚO_RDWRÚdup2rL   Útargetfd_saver?  rv  Ú
syscapturerw   r   r<  r%  r@  )r~   r  s     r6   r˜   ÚFDCaptureBase.__init__½  sè   € Ø Œð	)Ü�HŠH�XÔð  %)ˆDÔ!ÜŸVšV HÓ-ˆÔà�q‹=Ü¤§
¡
°WÑ=ˆDŒLÜ0:¸8Ó0DˆD�Oä&Ü¨Ñ*Ø Ø ØØ"ñˆDŒLð œ<Ó'Ü",¨X·|±|Ó"D�•ä"+¨HÓ"5�”à#ˆ�øôE ó 	5ô 13·²¼¿
¹
ÄBÇIÁIÓ0NˆDÔ!Ü�GŠG�D×)Ñ)¨8×4ð	5ús   ˆC
 Ã
A#D1Ä0D1c                ó¢   • SU R                   R                   SU R                   SU R                   SU R                  < SU R
                  < S3$ )NÚ<Ú z oldfd=ú _state=z	 tmpfile=Ú>)rš   r‰   r  r…  r@  r?  r}   s    r6   rH  ÚFDCaptureBase.__repr__æ  sR   € à�—‘×'Ñ'Ð(¨¨$¯-©-¨¸À×@RÑ@RÐ?Sð TØ—k‘k‘_ I¨d¯l©lÑ-=¸Qð@ð	
r8   c                ó„   • U R                   U;   d0   SR                  XR                   SR                  U5      5      5       eg rK  rL  rN  s      r6   rQ  ÚFDCaptureBase._assert_stateì  rS  r8   c                óÜ   • U R                  SS5        [        R                  " U R                  R	                  5       U R
                  5        U R                  R                  5         SU l        g)z4Start capturing on targetfd using memorized tmpfile.r  rU  rV  N)	rQ  rK   r„  r?  rM   r  r†  r  r@  r}   s    r6   r  ÚFDCaptureBase.startó  sI   € à×Ñ˜7Ð$4Ô5Ü
�Š�—‘×#Ñ#Ó% t§}¡}Ô5Ø�‰×ÑÔØˆ�r8   c                ó$  • U R                  SS5        U R                  S:X  a  g[        R                  " U R                  U R
                  5        [        R                  " U R                  5        U R                  bZ  U R                  U R
                  :w  a   [        R                  " U R
                  5        [        R                  " U R                  5        U R                  R                  5         U R                  R                  5         SU l        g)zWStop capturing, restore streams, return original capture file,
seeked to position zero.r  rZ  N)rQ  r@  rK   r„  r…  r  rÕ   r�  r†  r  r?  r}   s    r6   r  ÚFDCaptureBase.doneú  sµ   € ð 	×Ñ˜6Ð#RÔSØ�;‰;˜&Ó ØÜ
�Š�×"Ñ" D§M¡MÔ2Ü
�Š�×#Ñ#Ô$Ø× Ñ Ñ,Ø×$Ñ$¨¯©Ó5Ü—’˜Ÿ™Ô'Ü�HŠH�T×*Ñ*Ô+Ø�‰×ÑÔØ�‰×ÑÔØˆ�r8   c                óâ   • U R                  SS5        U R                  S:X  a  g U R                  R                  5         [        R
                  " U R                  U R                  5        SU l        g r^  )rQ  r@  r†  r  rK   r„  r…  r  r}   s    r6   r  ÚFDCaptureBase.suspend
  sQ   € Ø×Ñ˜9Ð&>Ô?Ø�;‰;˜+Ó%ØØ�‰×ÑÔ!Ü
�Š�×"Ñ" D§M¡MÔ2Ø!ˆ�r8   c                óþ   • U R                  SS5        U R                  S:X  a  g U R                  R                  5         [        R
                  " U R                  R                  5       U R                  5        SU l        g rb  )	rQ  r@  r†  r  rK   r„  r?  rM   r  r}   s    r6   r  ÚFDCaptureBase.resume  sX   € Ø×Ñ˜8Ð%=Ô>Ø�;‰;˜)Ó#ØØ�‰×ÑÔ Ü
�Š�—‘×#Ñ#Ó% t§}¡}Ô5Øˆ�r8   )r@  r†  r  r�  r…  r?  N)r  r®   r‡   r¡   r†   rd  r    )r‰   rŠ   r‹   rŒ   r˜   rH  rQ  r  r  r  r  r�   ry   r8   r6   r|  r|  ¼  s&   † ô'$ôR
ô
ô ôô "÷ r8   r|  c                  ó0   • \ rS rSrSrSrSS jrS	S jrSrg)
ÚFDCaptureBinaryi  zOCapture IO to/from a given OS-level file descriptor.

snap() produces `bytes`.
r8   c                ó  • U R                  SS5        U R                  R                  S5        U R                  R                  R	                  5       nU R                  R                  S5        U R                  R                  5         U$ rh  ri  rj  s     r6   r  ÚFDCaptureBinary.snap#  rm  r8   c                ój   • U R                  SS5        [        R                  " U R                  U5        g)ú"Write to original file descriptor.r  r_  N)rQ  rK   ro   r…  rë   s     r6   r  ÚFDCaptureBinary.writeorg+  s'   € à×Ñ˜:Ð'?Ô@Ü
�Š�×#Ñ# TÕ*r8   ry   Nrq  rs  ©	r‰   rŠ   r‹   rŒ   Ú__doc__r  r  r  r�   ry   r8   r6   r™  r™    s   † ñð
 €Lô÷+r8   r™  c                  ó0   • \ rS rSrSrSrSS jrS	S jrSrg)
Ú	FDCapturei1  zLCapture IO to/from a given OS-level file descriptor.

snap() produces text.
rƒ   c                óþ   • U R                  SS5        U R                  R                  S5        U R                  R                  5       nU R                  R                  S5        U R                  R	                  5         U$ rh  )rQ  r?  rÞ   r»   rç   rj  s     r6   r  ÚFDCapture.snap9  s^   € Ø×Ñ˜6Ð#;Ô<Ø�‰×Ñ˜!ÔØ�l‰l×ÑÓ!ˆØ�‰×Ñ˜!ÔØ�‰×ÑÔØˆ
r8   c                óˆ   • U R                  SS5        [        R                  " U R                  UR	                  S5      5        g)r�  r  r_  r~  N)rQ  rK   ro   r…  Úencoderë   s     r6   r  ÚFDCapture.writeorgA  s0   € à×Ñ˜:Ð'?Ô@ä
�Š�×#Ñ# T§[¡[°Ó%9Õ:r8   ry   Nr†   r5  rŸ  ry   r8   r6   r¢  r¢  1  s   † ñð
 €Lô÷;r8   r¢  )é   é   c                  ó.   • \ rS rSr% SrS\S'   S\S'   Srg)ÚCaptureResultiN  úOThe result of :method:`caplog.readouterr() <pytest.CaptureFixture.readouterr>`.r	   rs   rt   ry   N)r‰   rŠ   r‹   rŒ   r   r  r�   ry   r8   r6   r«  r«  N  s   ‡ á]à‹ØŽr8   r«  c                  ó   • \ rS rSrSrSrSrg)r«  iW  r¬  ry   N)r‰   rŠ   r‹   rŒ   r   r�   r�   ry   r8   r6   r«  r«  W  s   † ñ 	^à‹	r8   rs   rt   c                  óŠ   • \ rS rSrSrSr        SS jrSS jrSS jrSS jr	SSS jjr
SS	 jrSS
 jrSS jrSS jrSrg)ÚMultiCapturei`  NFc                ó(   • Xl         X l        X0l        g r{   ©Úin_rs   rt   )r~   r²  rs   rt   s       r6   r˜   ÚMultiCapture.__init__d  s   € ð 03ŒØ/2ŒØ/2�r8   c                ó”   • SU R                   < SU R                  < SU R                  < SU R                  < SU R                  < S3$ )Nz<MultiCapture out=z err=z in_=r‹  z _in_suspended=rŒ  )rs   rt   r²  r@  Ú_in_suspendedr}   s    r6   rH  ÚMultiCapture.__repr__n  sJ   € à  §¡¡¨E°$·(±(±¸UÀ4Ç8Á8Á,ð OØ—k‘k‘_ O°D×4FÑ4FÑ3IÈðLð	
r8   c                ó  • SU l         U R                  (       a  U R                  R                  5         U R                  (       a  U R                  R                  5         U R                  (       a  U R                  R                  5         g g )NrV  )r@  r²  r  rs   rt   r}   s    r6   Ústart_capturingÚMultiCapture.start_capturingt  sM   € ØˆŒØ�8�8Ø�H‰H�N‰NÔØ�8�8Ø�H‰H�N‰NÔØ�8�8Ø�H‰H�N‰NÕð r8   c                óð   • U R                  5       u  pU(       a*  U R                  c   eU R                  R                  U5        U(       a*  U R                  c   eU R                  R                  U5        X4$ )z?Pop current snapshot out/err capture and flush to orig streams.)Ú
readouterrrs   r  rt   ©r~   rs   rt   s      r6   Úpop_outerr_to_origÚMultiCapture.pop_outerr_to_orig}  sa   € à—?‘?Ó$‰ˆÞØ—8‘8Ñ'Ð'Ð'Ø�H‰H×Ñ˜cÔ"ÞØ—8‘8Ñ'Ð'Ð'Ø�H‰H×Ñ˜cÔ"Øˆxˆr8   c                ó4  • SU l         U R                  (       a  U R                  R                  5         U R                  (       a  U R                  R                  5         U(       a4  U R                  (       a"  U R                  R                  5         SU l        g g g )Nr[  T)r@  rs   r  rt   r²  rµ  ©r~   r²  s     r6   Úsuspend_capturingÚMultiCapture.suspend_capturingˆ  s_   € Ø!ˆŒØ�8�8Ø�H‰H×ÑÔØ�8�8Ø�H‰H×ÑÔÞ�4—8—8Ø�H‰H×ÑÔØ!%ˆDÕð ˆ3r8   c                óB  • SU l         U R                  (       a  U R                  R                  5         U R                  (       a  U R                  R                  5         U R                  (       a1  U R
                  c   eU R
                  R                  5         SU l        g g )NrV  F)r@  rs   r  rt   rµ  r²  r}   s    r6   Úresume_capturingÚMultiCapture.resume_capturing’  sg   € ØˆŒØ�8�8Ø�H‰H�O‰OÔØ�8�8Ø�H‰H�O‰OÔØ××Ø—8‘8Ñ'Ð'Ð'Ø�H‰H�O‰OÔØ!&ˆDÕð r8   c                óL  • U R                   S:X  a  [        S5      eSU l         U R                  (       a  U R                  R                  5         U R                  (       a  U R                  R                  5         U R
                  (       a  U R
                  R                  5         gg)z+Stop capturing and reset capturing streams.Ústoppedzwas already stoppedN)r@  Ú
ValueErrorrs   r  rt   r²  r}   s    r6   Ústop_capturingÚMultiCapture.stop_capturing�  sb   € à�;‰;˜)Ó#ÜÐ2Ó3Ð3ØˆŒØ�8�8Ø�H‰H�M‰MŒOØ�8�8Ø�H‰H�M‰MŒOØ�8�8Ø�H‰H�M‰M�Oð r8   c                ó    • U R                   S:H  $ )z7Whether actively capturing -- not suspended or stopped.rV  )r@  r}   s    r6   Ú
is_startedÚMultiCapture.is_started©  s   € à�{‰{˜iÑ'Ð'r8   c                óÌ   • U R                   (       a  U R                   R                  5       OSnU R                  (       a  U R                  R                  5       OSn[        X5      $ r1  )rs   r  rt   r«  r¼  s      r6   r»  ÚMultiCapture.readouterr­  s;   € Ø!%§§ˆd�h‰h�m‰mŒo¨rˆØ!%§§ˆd�h‰h�m‰mŒo¨rˆä˜SÓ&Ð&r8   )rµ  r@  rt   r²  rs   )r²  úCaptureBase[AnyStr] | Noners   rÐ  rt   rÐ  r‡   r¡   r†   r    )r‡   ztuple[AnyStr, AnyStr]©F©r²  r  r‡   r¡   r  ©r‡   zCaptureResult[AnyStr])r‰   rŠ   r‹   rŒ   r@  rµ  r˜   rH  r¸  r½  rÁ  rÄ  rÉ  rÌ  r»  r�   ry   r8   r6   r¯  r¯  `  s_   † Ø€FØ€Mð3à'ð3ð (ð3ð (ð	3ð
 
ô3ô
ôô	ö&ô	'ô
ô(÷'r8   r¯  c           	     ó4  • U S:X  a&  [        [        S5      [        S5      [        S5      S9$ U S:X  a&  [        [        S5      [        S5      [        S5      S9$ U S:X  a  [        S S S S9$ U S:X  a  [        S [        SS	S
9[        SS	S
9S9$ [        SU < 35      e)Nr!   r   r"  r#  r±  r"   r#   r$   Tr8  zunknown capturing method: )r¯  r¢  rv  rÈ  )r(   s    r6   Ú_get_multicapturerÕ  ´  sœ   € Ø�ƒ~Ü¤	¨!£´)¸A³,ÄIÈaÃLÑQÐQØ	�5‹Ü¤
¨1£´:¸a³=ÄjÐQRÃmÑTÐTØ	�4‹Ü ¨$°DÑ9Ð9Ø	�9Ó	ÜØœ* Q¨DÑ1´zÀ!ÈÑ7Nñ
ð 	
ô Ð1°&±Ð<Ó
=Ð=r8   c                  óÊ  • \ rS rSrSrS!S jrS"S jrS#S jrS$S jrS%S jr	S%S jr
S%S	 jrS&S'S
 jjrS&S'S jjrS%S jrS(S jrS)S jrS%S jrS%S jrS%S jrS%S jrS%S jr\R.                  S*S j5       r\R.                  S+S j5       r\" SS9    S,S j5       r\" SS9S-S j5       r\" SS9S-S j5       r\" SS9S-S j5       r\" SS9S%S j5       r\" SS9S%S j5       r Sr!g ).rg   iÅ  a‰  The capture plugin.

Manages that the appropriate capture method is enabled/disabled during
collection and each test phase (setup, call, teardown). After each of
those points, the captured output is obtained and attached to the
collection/runtest report.

There are two levels of capture:

* global: enabled by default and can be suppressed by the ``-s``
  option. This is always enabled/disabled during collection and each test
  phase.

* fixture: when a test function or one of its fixture depend on the
  ``capsys`` or ``capfd`` fixtures. In this case special handling is
  needed to ensure the fixtures take precedence over the global capture.
c                ó,   • Xl         S U l        S U l        g r{   ©Ú_methodÚ_global_capturingÚ_capture_fixture)r~   r(   s     r6   r˜   ÚCaptureManager.__init__Ø  s   € Ø$ŒØ;?ˆÔØ<@ˆÕr8   c                ó\   • SU R                   < SU R                  < SU R                  < S3$ )Nz<CaptureManager _method=z _global_capturing=z _capture_fixture=rŒ  rØ  r}   s    r6   rH  ÚCaptureManager.__repr__Ý  s:   € à& t§|¡|Ñ&6Ð6IÈ$×J`ÑJ`ÑIcð d Ø $× 5Ñ 5Ñ8¸ð;ð	
r8   c                ó˜   • U R                  5       (       a  gU R                  (       a#  SU R                  R                  R                   3$ g)NÚglobalzfixture F)Úis_globally_capturingrÛ  ÚrequestÚfixturenamer}   s    r6   Úis_capturingÚCaptureManager.is_capturingã  s@   € Ø×%Ñ%×'Ñ'ØØ× × Ø˜d×3Ñ3×;Ñ;×GÑGÐHÐIÐIØr8   c                ó    • U R                   S:g  $ )Nr#   )rÙ  r}   s    r6   rá  Ú$CaptureManager.is_globally_capturingì  s   € Ø�|‰|˜tÑ#Ð#r8   c                óŠ   • U R                   b   e[        U R                  5      U l         U R                   R                  5         g r{   )rÚ  rÕ  rÙ  r¸  r}   s    r6   rk   Ú%CaptureManager.start_global_capturingï  s7   € Ø×%Ñ%Ñ-Ð-Ð-Ü!2°4·<±<Ó!@ˆÔØ×Ñ×.Ñ.Õ0r8   c                ó–   • U R                   b<  U R                   R                  5         U R                   R                  5         S U l         g g r{   )rÚ  r½  rÉ  r}   s    r6   rj   Ú$CaptureManager.stop_global_capturingô  s?   € Ø×!Ñ!Ñ-Ø×"Ñ"×5Ñ5Ô7Ø×"Ñ"×1Ñ1Ô3Ø%)ˆDÕ"ð .r8   c                óT   • U R                   b  U R                   R                  5         g g r{   )rÚ  rÄ  r}   s    r6   Úresume_global_captureÚ$CaptureManager.resume_global_captureú  s'   € ð ×!Ñ!Ñ-Ø×"Ñ"×3Ñ3Õ5ð .r8   c                óR   • U R                   b  U R                   R                  US9  g g )N©r²  )rÚ  rÁ  rÀ  s     r6   rl   Ú%CaptureManager.suspend_global_capture   s*   € Ø×!Ñ!Ñ-Ø×"Ñ"×4Ñ4¸Ð4Ò=ð .r8   c                óF   • U R                  5         U R                  U5        g r{   )Úsuspend_fixturerl   rÀ  s     r6   r  ÚCaptureManager.suspend  s   € à×ÑÔØ×#Ñ# CÕ(r8   c                óD   • U R                  5         U R                  5         g r{   )rí  Úresume_fixturer}   s    r6   r  ÚCaptureManager.resume	  s   € Ø×"Ñ"Ô$Ø×ÑÕr8   c                óT   • U R                   c   eU R                   R                  5       $ r{   )rÚ  r»  r}   s    r6   rn   Ú"CaptureManager.read_global_capture  s)   € Ø×%Ñ%Ñ1Ð1Ð1Ø×%Ñ%×0Ñ0Ó2Ð2r8   c                óâ   • U R                   (       aX  U R                   R                  R                  nUR                  R                  nUR                  R                  SU SU S35        Xl         g )Nzcannot use z and z at the same time)rÛ  râ  rã  Ú
raiseerror)r~   Úcapture_fixtureÚcurrent_fixtureÚrequested_fixtures       r6   Úset_fixtureÚCaptureManager.set_fixture  sf   € Ø× × Ø"×3Ñ3×;Ñ;×GÑGˆOØ /× 7Ñ 7× CÑ CÐØ×#Ñ#×.Ñ.ØÐ/Ð0°°oÐ5FÐFWÐXôð !0Õr8   c                ó   • S U l         g r{   )rÛ  r}   s    r6   Úunset_fixtureÚCaptureManager.unset_fixture  s
   € Ø $ˆÕr8   c                ó\   • U R                   (       a  U R                   R                  5         gg)ztIf the current item is using ``capsys`` or ``capfd``, activate
them so they take precedence over the global capture.N)rÛ  Ú_startr}   s    r6   Úactivate_fixtureÚCaptureManager.activate_fixture  s$   € ð × × Ø×!Ñ!×(Ñ(Õ*ð !r8   c                ó\   • U R                   (       a  U R                   R                  5         gg)zDDeactivate the ``capsys`` or ``capfd`` fixture of this item, if any.N)rÛ  rÕ   r}   s    r6   Údeactivate_fixtureÚ!CaptureManager.deactivate_fixture%  s"   € à× × Ø×!Ñ!×'Ñ'Õ)ð !r8   c                ó\   • U R                   (       a  U R                   R                  5         g g r{   )rÛ  Ú_suspendr}   s    r6   ró  ÚCaptureManager.suspend_fixture*  s"   € Ø× × Ø×!Ñ!×*Ñ*Õ,ð !r8   c                ó\   • U R                   (       a  U R                   R                  5         g g r{   )rÛ  Ú_resumer}   s    r6   rö  ÚCaptureManager.resume_fixture.  s"   € Ø× × Ø×!Ñ!×)Ñ)Õ+ð !r8   c              #  óì  #   • U R                   =(       a    U R                   R                  5       nU(       a  U R                  5         U R                  =(       a    U R                  R	                  5       nU(       a  U R                  5          Sv •  U(       a  U R                  5         U(       a  U R                  5         gg! U(       a  U R                  5         U(       a  U R                  5         f f = f7f)zLContext manager to temporarily disable global and current fixture capturing.N)rÛ  Ú_is_startedró  rÚ  rÌ  rl   rí  rö  )r~   Ú
do_fixtureÚ	do_globals      r6   Úglobal_and_fixture_disabledÚ*CaptureManager.global_and_fixture_disabled4  s´   é € ð ×*Ñ*×R¨t×/DÑ/D×/PÑ/PÓ/Rˆ
ÞØ× Ñ Ô"Ø×*Ñ*×R¨t×/EÑ/E×/PÑ/PÓ/Rˆ	ÞØ×'Ñ'Ô)ð	&ÛæØ×*Ñ*Ô,ÞØ×#Ñ#Õ%ð øö Ø×*Ñ*Ô,ÞØ×#Ñ#Õ%ð üs   ‚B	C4ÂC  Â0C4Ã 1C1Ã1C4c              #  ó¼  #   • U R                  5         U R                  5          S v •  U R                  5         U R                  SS9  U R	                  5       u  p4UR                  USU5        UR                  USU5        g ! U R                  5         U R                  SS9  U R	                  5       u  p4UR                  USU5        UR                  USU5        f = f7f)NFrð  r]   r^   )rí  r  r	  rl   rn   Úadd_report_section)r~   ÚwhenÚitemrs   rt   s        r6   Úitem_captureÚCaptureManager.item_captureE  sÊ   é € à×"Ñ"Ô$Ø×ÑÔð	9Ûà×#Ñ#Ô%Ø×'Ñ'¨EÐ'Ñ2à×/Ñ/Ó1‰HˆCØ×#Ñ# D¨(°CÔ8Ø×#Ñ# D¨(°CÕ8øð ×#Ñ#Ô%Ø×'Ñ'¨EÐ'Ñ2à×/Ñ/Ó1‰HˆCØ×#Ñ# D¨(°CÔ8Ø×#Ñ# D¨(°CÕ8üs   ‚!C¤B  ¨ACÂ ACÃCTra   c              #  ól  #   • [        U[        5      (       a�  U R                  5          S v •nU R                  5         U R	                  5       u  p4U(       a  UR
                  R                  SU45        U(       a  UR
                  R                  SU45        U$ S v •nU$ ! U R                  5         f = f7f)NzCaptured stdoutzCaptured stderr)rZ   r   rí  rl   rn   ÚsectionsÚappend)r~   Ú	collectorÚreprs   rt   s        r6   Úpytest_make_collect_reportÚ)CaptureManager.pytest_make_collect_reportU  sž   é € ô �i¤×&Ñ&Ø×&Ñ&Ô(ð.Ú�à×+Ñ+Ô-Ø×/Ñ/Ó1‰HˆCÞØ—‘×#Ñ#Ð%6¸Ð$<Ô=ÞØ—‘×#Ñ#Ð%6¸Ð$<Ô=ð ˆ
ò ˆCØˆ
øð ×+Ñ+Õ-üs   ‚&B4©B ­A2B4ÂB1Â1B4c              #  ól   #   • U R                  SU5         S v •sS S S 5        $ ! , (       d  f       g = f7f)NÚsetup©r  ©r~   r  s     r6   Úpytest_runtest_setupÚ#CaptureManager.pytest_runtest_setuph  s#   é € à×Ñ˜w¨Õ-Ú÷ .×-×-üó   ‚4•#™
4£
1­4c              #  ól   #   • U R                  SU5         S v •sS S S 5        $ ! , (       d  f       g = f7f)NÚcallr&  r'  s     r6   Úpytest_runtest_callÚ"CaptureManager.pytest_runtest_callm  s#   é € à×Ñ˜v tÕ,Ú÷ -×,×,ür*  c              #  ól   #   • U R                  SU5         S v •sS S S 5        $ ! , (       d  f       g = f7f)NÚteardownr&  r'  s     r6   Úpytest_runtest_teardownÚ&CaptureManager.pytest_runtest_teardownr  s#   é € à×Ñ˜z¨4Õ0Ú÷ 1×0×0ür*  )Útryfirstc                ó$   • U R                  5         g r{   ©rj   r}   s    r6   Úpytest_keyboard_interruptÚ(CaptureManager.pytest_keyboard_interruptw  ó   € à×"Ñ"Õ$r8   c                ó$   • U R                  5         g r{   r5  r}   s    r6   Úpytest_internalerrorÚ#CaptureManager.pytest_internalerror{  r8  r8   )rÛ  rÚ  rÙ  N)r(   Ú_CaptureMethodr‡   r¡   r†   )r‡   z
str | boolr  r    rÑ  rÒ  )r‡   zCaptureResult[str])rü  zCaptureFixture[Any]r‡   r¡   ©r‡   úGenerator[None])r  rˆ   r  r   r‡   r>  )r   r   r‡   z-Generator[None, CollectReport, CollectReport])r  r   r‡   r>  )"r‰   rŠ   r‹   rŒ   r   r˜   rH  rä  rá  rk   rj   rí  rl   r  r  rn   rÿ  r  r  r	  ró  rö  Ú
contextlibÚcontextmanagerr  r  r   r"  r(  r-  r1  r6  r:  r�   ry   r8   r6   rg   rg   Å  s7  † ñô$Aô

ôô$ô1ô
*ô6ö>ö)ô
ô3ô0ô%ô+ô*ô
-ô,ð ×Ñó&ó ð&ð  ×Ñó9ó ð9ñ �dÑðØ"ðà	6óó ðñ$ �dÑóó ðñ �dÑóó ðñ �dÑóó ðñ �tÑó%ó ð%ñ �tÑó%ó ó%r8   rg   c                  óœ   • \ rS rSrSrSS.       SS jjrSS jrSS jrSS jrSS	 jr	SS
 jr
SS jr\R                  SS j5       rSrg)ÚCaptureFixturei€  zxObject returned by the :fixture:`capsys`, :fixture:`capsysbinary`,
:fixture:`capfd` and :fixture:`capfdbinary` fixtures.F©Ú	_ispytestc               ó¬   • [        U5        Xl        X l        S U l        U R                  R                  U l        U R                  R                  U l        g r{   )r   Úcaptureclassrâ  Ú_capturer  Ú_captured_outÚ_captured_err)r~   rF  râ  rD  s       r6   r˜   ÚCaptureFixture.__init__„  sF   € ô 	�yÔ!Ø7CÔØŒØ59ˆŒØ%)×%6Ñ%6×%CÑ%CˆÔØ%)×%6Ñ%6×%CÑ%CˆÕr8   c                ó°   • U R                   cI  [        S U R                  S5      U R                  S5      S9U l         U R                   R                  5         g g )Nr"  r#  r±  )rG  r¯  rF  r¸  r}   s    r6   r  ÚCaptureFixture._start’  sN   € Ø�=‰=Ñ Ü(ØØ×%Ñ% aÓ(Ø×%Ñ% aÓ(ñˆDŒMð
 �M‰M×)Ñ)Õ+ð !r8   c                óî   • U R                   bh  U R                   R                  5       u  pU =R                  U-  sl        U =R                  U-  sl        U R                   R	                  5         S U l         g g r{   )rG  r½  rH  rI  rÉ  r¼  s      r6   rÕ   ÚCaptureFixture.close›  s^   € Ø�=‰=Ñ$Ø—}‘}×7Ñ7Ó9‰HˆCØ×Ò #Ñ%ÕØ×Ò #Ñ%ÕØ�M‰M×(Ñ(Ô*Ø ˆD�Mð %r8   c                ó  • U R                   U R                  p!U R                  b$  U R                  R                  5       u  p4X-  nX$-  nU R                  R
                  U l         U R                  R
                  U l        [        X5      $ )z¯Read and return the captured output so far, resetting the internal
buffer.

:returns:
    The captured content as a namedtuple with ``out`` and ``err``
    string attributes.
)rH  rI  rG  r»  rF  r  r«  )r~   Úcaptured_outÚcaptured_errrs   rt   s        r6   r»  ÚCaptureFixture.readouterr£  sx   € ð &*×%7Ñ%7¸×9KÑ9K�lØ�=‰=Ñ$Ø—}‘}×/Ñ/Ó1‰HˆCØÑˆLØÑˆLØ!×.Ñ.×;Ñ;ˆÔØ!×.Ñ.×;Ñ;ˆÔÜ˜\Ó8Ð8r8   c                óT   • U R                   b  U R                   R                  5         gg)z1Suspend this fixture's own capturing temporarily.N)rG  rÁ  r}   s    r6   r  ÚCaptureFixture._suspend´  s!   € à�=‰=Ñ$Ø�M‰M×+Ñ+Õ-ð %r8   c                óT   • U R                   b  U R                   R                  5         gg)z0Resume this fixture's own capturing temporarily.N)rG  rÄ  r}   s    r6   r  ÚCaptureFixture._resume¹  s!   € à�=‰=Ñ$Ø�M‰M×*Ñ*Õ,ð %r8   c                óR   • U R                   b  U R                   R                  5       $ g)z5Whether actively capturing -- not disabled or closed.F)rG  rÌ  r}   s    r6   r  ÚCaptureFixture._is_started¾  s"   € à�=‰=Ñ$Ø—=‘=×+Ñ+Ó-Ð-Ør8   c              #  óÆ   #   • U R                   R                  R                  R                  S5      nUR	                  5          Sv •  SSS5        g! , (       d  f       g= f7f)z>Temporarily disable capturing while inside the ``with`` block.rd   N)râ  Úconfigrf   Ú	getpluginr  )r~   Ú
capmanagers     r6   ÚdisabledÚCaptureFixture.disabledÄ  sF   é € ð &*§\¡\×%8Ñ%8×%FÑ%F×%PÑ%PØó&
ˆ
ð ×3Ñ3Õ5Û÷ 6×5Ö5üs   ‚A A!ÁAÁ	A!Á
AÁA!)rG  rI  rH  rF  râ  N)rF  ztype[CaptureBase[AnyStr]]râ  r   rD  r  r‡   r¡   r    rÓ  r  r=  )r‰   rŠ   r‹   rŒ   r   r˜   r  rÕ   r»  r  r  r  r?  r@  r]  r�   ry   r8   r6   rB  rB  €  st   † ñ=ð  ñDà/ðDð ðDð
 ðDð 
õDô,ô!ô9ô".ô
-ô
ð ×Ñóó ór8   rB  c              #  óþ   #   • U R                   R                  R                  S5      n[        [        U SS9nUR                  U5        UR                  5         Uv •  UR                  5         UR                  5         g7f)aä  Enable text capturing of writes to ``sys.stdout`` and ``sys.stderr``.

The captured output is made available via ``capsys.readouterr()`` method
calls, which return a ``(out, err)`` namedtuple.
``out`` and ``err`` will be ``text`` objects.

Returns an instance of :class:`CaptureFixture[str] <pytest.CaptureFixture>`.

Example:

.. code-block:: python

    def test_output(capsys):
        print("hello")
        captured = capsys.readouterr()
        assert captured.out == "hello\n"
rd   TrC  N)	rZ  rf   r[  rB  rv  rÿ  r  rÕ   r  ©râ  rr   rü  s      r6   Úcapsysra  Ñ  sh   é € ð& %Ÿ^™^×9Ñ9×CÑCÐDTÓU€FÜ$¤Z°ÀDÑI€OØ
×Ñ�Ô'Ø×ÑÔØ
ÒØ×ÑÔØ
×ÑÕùó   ‚A;A=c              #  óþ   #   • U R                   R                  R                  S5      n[        [        U SS9nUR                  U5        UR                  5         Uv •  UR                  5         UR                  5         g7f)aû  Enable bytes capturing of writes to ``sys.stdout`` and ``sys.stderr``.

The captured output is made available via ``capsysbinary.readouterr()``
method calls, which return a ``(out, err)`` namedtuple.
``out`` and ``err`` will be ``bytes`` objects.

Returns an instance of :class:`CaptureFixture[bytes] <pytest.CaptureFixture>`.

Example:

.. code-block:: python

    def test_output(capsysbinary):
        print("hello")
        captured = capsysbinary.readouterr()
        assert captured.out == b"hello\n"
rd   TrC  N)	rZ  rf   r[  rB  rf  rÿ  r  rÕ   r  r`  s      r6   Úcapsysbinaryrd  í  si   é € ð& %Ÿ^™^×9Ñ9×CÑCÐDTÓU€FÜ$Ô%5°wÈ$ÑO€OØ
×Ñ�Ô'Ø×ÑÔØ
ÒØ×ÑÔØ
×ÑÕùrb  c              #  óþ   #   • U R                   R                  R                  S5      n[        [        U SS9nUR                  U5        UR                  5         Uv •  UR                  5         UR                  5         g7f)að  Enable text capturing of writes to file descriptors ``1`` and ``2``.

The captured output is made available via ``capfd.readouterr()`` method
calls, which return a ``(out, err)`` namedtuple.
``out`` and ``err`` will be ``text`` objects.

Returns an instance of :class:`CaptureFixture[str] <pytest.CaptureFixture>`.

Example:

.. code-block:: python

    def test_system_echo(capfd):
        os.system('echo "hello"')
        captured = capfd.readouterr()
        assert captured.out == "hello\n"
rd   TrC  N)	rZ  rf   r[  rB  r¢  rÿ  r  rÕ   r  r`  s      r6   Úcapfdrf  	  sh   é € ð& %Ÿ^™^×9Ñ9×CÑCÐDTÓU€FÜ$¤Y°À4ÑH€OØ
×Ñ�Ô'Ø×ÑÔØ
ÒØ×ÑÔØ
×ÑÕùrb  c              #  óþ   #   • U R                   R                  R                  S5      n[        [        U SS9nUR                  U5        UR                  5         Uv •  UR                  5         UR                  5         g7f)a  Enable bytes capturing of writes to file descriptors ``1`` and ``2``.

The captured output is made available via ``capfd.readouterr()`` method
calls, which return a ``(out, err)`` namedtuple.
``out`` and ``err`` will be ``byte`` objects.

Returns an instance of :class:`CaptureFixture[bytes] <pytest.CaptureFixture>`.

Example:

.. code-block:: python

    def test_system_echo(capfdbinary):
        os.system('echo "hello"')
        captured = capfdbinary.readouterr()
        assert captured.out == b"hello\n"

rd   TrC  N)	rZ  rf   r[  rB  r™  rÿ  r  rÕ   r  r`  s      r6   Úcapfdbinaryrh  %  sh   é € ð( %Ÿ^™^×9Ñ9×CÑCÐDTÓU€FÜ$¤_°gÈÑN€OØ
×Ñ�Ô'Ø×ÑÔØ
ÒØ×ÑÔØ
×ÑÕùrb  )r4   r   r‡   r¡   r    )rU   r   r‡   r¡   )rp   r   r‡   r>  )r(   r<  r‡   zMultiCapture[str])râ  r   r‡   zGenerator[CaptureFixture[str]])râ  r   r‡   z Generator[CaptureFixture[bytes]])Or   Ú
__future__r   r   Úcollectionsr?  rH   r   rK   r"   Útempfiler   Útypesr   Útypingr   r	   r
   r   r   r   r   r   r   r   r   r   r   Útyping_extensionsr   Ú_pytest.configr   r   Ú_pytest.config.argparsingr   Ú_pytest.deprecatedr   Ú_pytest.fixturesr   r   Ú_pytest.nodesr   r   r   Ú_pytest.reportsr   r<  r7   r?   r`   ru   rI   rw   r‘   r¥   r°   ÚABCr  r<  rˆ   r%  r7  rr  rf  rv  r|  r™  r¢  Úversion_infor«  Ú
namedtupler¯  rÕ  rg   rB  ra  rd  rf  rh  ry   r8   r6   Ú<module>rx     sh  ðá 1å "ã 
Û Û Û 	Ý #Û 	Û 
Ý "Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý  ö Ý&å !Ý #Ý ,Ý -Ý $Ý 'Ý #Ý Ý Ý )ð Ð5Ñ6€ôô&ô41ñn 
�$Ñóó ðô:1�"×"Ñ"ô 1ô 6�× Ñ ô 6ô$�9ô $ôJ˜ô Jô`$�#—'‘'˜7 6™?ô $ð@ ˜x¨HÑ5€ô�˜CÑ ô ô2@ �[ Ñ(ô @ ôF!�~ eÑ,ô !ô$� Ñ$ô ô"\ �K Ñ'ô \ ô~+�m EÑ*ô +ô,;�˜cÑ"ô ;ð6 ×Ñ�wÓ¦-à
ô˜
 G¨F¡Oó ó ñôØ×Ò˜°¸°Ó?Ø�‰ôôQ'�7˜6‘?ô Q'ôh>÷"x%ñ x%ôvK�W˜V‘_ô Kðb 	óó 	ðð6 	óó 	ðð6 	óó 	ðð6 	óó 	ñr8   