OwlCyberSecurity - MANAGER
Edit File: capture.cpython-311.pyc
� ������h����������������� �������� ����d�Z�ddlZddlZddlZddlZddlZddlZddlmZ�ddlm Z �ddl mZ�ddlm Z �ddlmZ�ddlmZ�dd lmZ�dd lmZ�ddlmZ�ddlmZ�dd lmZ�ddlmZ�ddlmZ�ddlmZ�ddlmZ�ddlmZ�ddlmZ�ddlmZ�ddlmZ�ddlmZ�ddlm Z �ddl!m"Z"�ddl#m$Z$�ddl%m&Z&�ddl%m'Z'�ddl(m)Z)�ddl(m*Z*�ddl(m+Z+�erddl,m-Z-�dd l,m.Z.�e.d!���������Z/d"e"d#dfd$�Z0d\d%�Z1d&ed#dfd'�Z2�e d(�)������������d*efd+���������������Z3�G�d,��d-ej4��������������������Z5�G�d.��d/ej4��������������������Z6�G�d0��d1e6������������Z7�G�d2��d3e������������Z8�G�d4��d5ej9��������ee���������������������Z:d6d7d8d9�Z;�G�d:��d;e:e<���������������������Z=�G�d<��d=e:e���������������������Z>�G�d>��d?e>e?���������������������Z@�G�d@��dAe>e<���������������������ZA�G�dB��dCe:e���������������������ZB�G�dD��dEeBe?���������������������ZC�G�dF��dGeBe<���������������������ZDejE��������dHk����sere�G�dI��dJeee�����������������������������������ZFn&�G�dK��dJ�ejG��������dJdLdMg������������ee���������������������ZF�G�dN��dOee���������������������ZHdPdQd#eHe<���������fdR�ZI�G�dS��dT������������ZJ�G�dU��dVee���������������������ZKe&dWe'd#eeKe<���������ddf���������fdX���������������ZLe&dWe'd#eeKe?���������ddf���������fdY���������������ZMe&dWe'd#eeKe<���������ddf���������fdZ���������������ZNe&dWe'd#eeKe?���������ddf���������fd[���������������ZOdS�)]z+Per-test stdout/stderr capturing mechanism.�����N��UnsupportedOperation)� TemporaryFile)� TracebackType)�Any)�AnyStr)�BinaryIO)� Generator)�Generic)�Iterable)�Iterator)�List)� NamedTuple)�Optional)�TextIO)�Tuple)�Type)� TYPE_CHECKING)�Union)�final)�Config)�hookimpl)�Parser)�check_ispytest)�fixture)� SubRequest)� Collector)�File)�Item)�Final)�Literal��fd�sys�no�tee-sys�parser�returnc�����������������������|�����������������������d������������}|���������������������ddddg�d�d��������������|���������������������d d ddd ��������������d�S�)N�generalz --capture�storer#����methodr"���z3Per-test capturing method: one of fd|sys|no|tee-sys)�action�default�metavar�choices�helpz-s�store_constr%����capturezShortcut for --capture=no)r-����const�destr1���)�getgroup� _addoption)r'����groups��� �`/builddir/build/BUILD/cloudlinux-venv-1.0.8/venv/lib/python3.11/site-packages/_pytest/capture.py�pytest_addoptionr:���-���s��������O�O�I�&�&�E� �������.�.�.� B� ��������� ������ � (�����������������c�������������������t�����t�����������j�����������������������������d������������r �ddl}�dS�#�t����������$�r�Y�dS�w�xY�wdS�)a��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��� r9����_colorama_workaroundrB���@���sZ��������|���w�'�'��� ��O�O�O�O�O���� �� �� ��D�D� ������s����'�� 5�5�streamc������������������������t�����������j�����������������������������d������������rt����������t�����������d������������rdS�t����������|�d������������sdS�t����������|�j��������d��������������r|�j��������j��������n|�j��������}t ����������|t����������j��������������������sdS��fd�}�|t�����������j ��������d������������t�����������_ ���������|t�����������j ��������d������������t�����������_ ���������|t�����������j��������d������������t�����������_��������dS�) 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��������������������������s|d���������dk����rd}nd}t����������j��������t����������t����������j��������|������������������������������������������������||������������|�j��������|�j��������|�j��������|�j ��������������������S�)Nr����w���) �io� TextIOWrapper�open�os�dup�fileno�encoding�errors�newlines�line_buffering)�f�mode� buffering�buffereds��� �r9���� _reopen_stdioz3_windowsconsoleio_workaround.<locals>._reopen_stdiot���sn��������� �D��G�s�N�N��I�I��I��������� � �#�#�T�9�5�5� �J� �H� �J� �� �� �� r;����rb�wb)r$���r>���r?����hasattrrF���rG���� isinstancerK����_WindowsConsoleIO�stdin�stdout�stderr)rC���� raw_stdoutrY���rX���s��� @r9����_windowsconsoleio_workaroundrc���O���s��������0��<�"�"�7�+�+���w�s�<O�/P�/P�������6�8�$�$������v�}�e�,�,�H�&.�A���"�"�F�M�J��j�"�"6�7�7����� �� �� �� �� ��� �c�i��.�.�C�I���s�z�4�0�0�C�J���s�z�4�0�0�C�J�J�Jr;���T��hookwrapper�early_configc��������������#����&��K����|�j���������}|j��������dk����rt����������t����������j���������������������t�������������������������|�j��������}t����������|j��������������������}|���������������������|d�������������|�� ��������������������|j ���������������������|������������������������������������d�V��}|������������������������������������|j ���������W|�����������������������������������\��}}t����������j�����������������������������|�������������t����������j�����������������������������|�������������d�S�d�S�)Nr#����capturemanager)�known_args_namespacer3���rc���r$���r`���rB���� pluginmanager�CaptureManager�register�add_cleanup�stop_global_capturing�start_global_capturing�suspend_global_capture�excinfo�read_global_capture�writera���)rf����nsrj����capman�outcome�out�errs��� r9����pytest_load_initial_conftestsry�������s��������� � *�B� �z�T���$�S�Z�0�0�0����� �.�M� �B�J� '� '�F����6�#3�4�4�4�����V�9�:�:�:���!�!�#�#�#��e�e�G� �!�!�#�#�#���"��-�-�/�/���S�� �������� ����������#�"r;���c��������������������J�����e�Zd�ZdZedefd���������������Zedefd���������������ZdS�)�EncodedFile��r(���c������������������*�����t����������|�j��������������������S��N)�reprrF�����selfs��� r9����namezEncodedFile.name����s��������D�K� � � r;���c������������������B�����|�j���������j�����������������������������dd������������S�)N�b��)rF���rV����replacer����s��� r9���rV���zEncodedFile.mode����s��������{��'�'��R�0�0�0r;���N)�__name__� __module__�__qualname__� __slots__�property�strr����rV���r|���r;���r9���r{���r{�������se���������������I� �!�c��!��!��!���X�!� ��1�c��1��1��1���X�1��1��1r;���r{���c��������������������,�������e�Zd�Zd��fd�Zdefd�Z��xZS�)� CaptureIOr(���Nc������������������t������t���������������������������������������������t����������j����������������������ddd��������������d�S�)N�UTF-8r����T)rQ����newline� write_through)�super�__init__rK����BytesIO)r����� __class__s��� �r9���r����zCaptureIO.__init__����s1������� �����������SW��X�X�X�X�Xr;���c�����������������������t����������|�j��������t����������j��������������������sJ��|�j����������������������������������������������������������������d������������S�)Nr����)r]���rF���rK���r�����getvalue�decoder����s��� r9���r����zCaptureIO.getvalue����s>�������$�+�r�z�2�2�2�2�2��{�#�#�%�%�,�,�W�5�5�5r;����r(���N)r����r����r����r����r����r����� __classcell__�r����s���@r9���r����r��������s^���������������Y��Y��Y��Y��Y��Y�6�#��6��6��6��6��6��6��6��6r;���r����c��������������������<�������e�Zd�Zdeddf��fd�Zdedef��fd�Z��xZS�)�TeeCaptureIO�otherr(���Nc������������������V������||�_���������t������������������������������������������������������������d�S�r~���)�_otherr����r����)r����r����r����s��� �r9���r����zTeeCaptureIO.__init__����s&���������� ���������r;����sc������������������z������t���������������������������������������������|�������������|�j�����������������������������|������������S�r~���)r����rs���r����)r����r����r����s��� �r9���rs���zTeeCaptureIO.write����s/������� ��� � �a�����{� � ��#�#�#r;���) r����r����r����r���r����r�����intrs���r����r����s���@r9���r����r��������sw����������������f����������������$�s��$�s��$��$��$��$��$��$��$��$��$��$r;���r����c������������������������e�Zd�Zedefd���������������Zd"dedefd�ZeZdefd�Z d"de e���������dee���������fd�Zde e���������fd �Zdefd �Zd#d�Zdefd �Zd#d�Zdefd�Zd$dededefd�Zdefd�Zdefd�Zd%de e���������defd�Zdedefd�Zdee���������ddfd�Zdefd�Zd&d�Zde ee������������������de e���������de e ���������ddfd �Z!ede"fd!���������������Z#dS�)'�DontReadFromInputr(���c������������������$�����t�����������j��������j��������S�r~���)r$���� __stdin__rQ���r����s��� r9���rQ���zDontReadFromInput.encoding����s �������}�%�%r;���rJ����sizec������������������ �����t����������d��������������NzJpytest: reading from stdin while output is captured! Consider using `-s`.��OSError�r����r����s��� r9����readzDontReadFromInput.read������������X� �� �� r;���c������������������*�����|�������������������������������������S�r~���)�readliner����s��� r9����__next__zDontReadFromInput.__next__����s�������}�}���r;����hintc������������������ �����t����������d�������������r����r����)r����r����s��� r9���� readlineszDontReadFromInput.readlines����r����r;���c�����������������������|�S�r~���r|���r����s��� r9����__iter__zDontReadFromInput.__iter__������������r;���c������������������ �����t����������d�������������)Nz/redirected stdin is pseudofile, has no fileno()r���r����s��� r9���rP���zDontReadFromInput.fileno����s������"�#T�U�U�Ur;���Nc������������������ �����t����������d�������������)Nz.redirected stdin is pseudofile, has no flush()r���r����s��� r9����flushzDontReadFromInput.flush����s������"�#S�T�T�Tr;���c�����������������������dS��NFr|���r����s��� r9����isattyzDontReadFromInput.isatty������������ur;���c�����������������������d�S�r~���r|���r����s��� r9����closezDontReadFromInput.close������������r;���c�����������������������dS�r����r|���r����s��� r9����readablezDontReadFromInput.readable����r����r;���r����offset�whencec������������������ �����t����������d�������������)Nz0redirected stdin is pseudofile, has no seek(int)r���)r����r����r����s��� r9����seekzDontReadFromInput.seek����s������"�#U�V�V�Vr;���c�����������������������dS�r����r|���r����s��� r9����seekablezDontReadFromInput.seekable����r����r;���c������������������ �����t����������d�������������)Nz-redirected stdin is pseudofile, has no tell()r���r����s��� r9����tellzDontReadFromInput.tell����s������"�#R�S�S�Sr;���c������������������ �����t����������d�������������)Nzcannot truncate stdinr���r����s��� r9����truncatezDontReadFromInput.truncate�����������"�#:�;�;�;r;����datac������������������ �����t����������d�������������)Nzcannot write to stdinr����r����r����s��� r9���rs���zDontReadFromInput.write����r����r;����linesc������������������ �����t����������d�������������)NzCannot write to stdinr���)r����r����s��� r9���� writelineszDontReadFromInput.writelines����r����r;���c�����������������������dS�r����r|���r����s��� r9����writablezDontReadFromInput.writable����r����r;���c�����������������������|�S�r~���r|���r����s��� r9���� __enter__zDontReadFromInput.__enter__����r����r;����type�value� tracebackc�����������������������d�S�r~���r|���)r����r����r����r����s��� r9����__exit__zDontReadFromInput.__exit__��s ������� �r;���c�����������������������|�S�r~���r|���r����s��� r9���rF���zDontReadFromInput.buffer ��s ��������r;���)rJ���r����)r���r~���)r(���r����)$r����r����r����r����r����rQ���r����r����r����r����r���r���r����r ���r����rP���r�����boolr����r����r����r����r����r����r����rs���r���r����r����r����r���� BaseExceptionr���r����r ���rF���r|���r;���r9���r����r��������s�������������� �&�#��&��&��&���X�&� �� ��� �c�� �� �� �� � ��H��#��������� �� �h�s�m�� �T�#�Y�� �� �� �� � �(�3�-���������V���V��V��V��V�U��U��U��U����������� �� �� �� ��$���������W��W�3��W���W�C��W��W��W��W��$���������T�c��T��T��T��T�<��<�X�c�]��<�c��<��<��<��<�<�#��<�#��<��<��<��<�<��� ��<�$��<��<��<��<��$���������������� ��t�M�*�+� ��� �&� ���M�*� � � � �� �� �� �������������X�����r;���r����c������������������������e�Zd�ZU�eed<���ej��������deddfd���������������Zej��������d d���������������Z ej��������d d���������������Z ej��������d d���������������Zej��������d d ���������������Zej��������d eddfd���������������Z ej��������defd���������������ZdS�)�CaptureBase�EMPTY_BUFFERr#���r(���Nc�����������������������t�������������������������r~�����NotImplementedError�r����r#���s��� r9���r����zCaptureBase.__init__���������!�#�#�#r;���c�����������������������t�������������������������r~���r����r����s��� r9����startzCaptureBase.start��r����r;���c�����������������������t�������������������������r~���r����r����s��� r9����donezCaptureBase.done��r����r;���c�����������������������t�������������������������r~���r����r����s��� r9����suspendzCaptureBase.suspend"��r����r;���c�����������������������t�������������������������r~���r����r����s��� r9����resumezCaptureBase.resume&��r����r;���r����c�����������������������t�������������������������r~���r����r����s��� r9����writeorgzCaptureBase.writeorg*��r����r;���c�����������������������t�������������������������r~���r����r����s��� r9����snapzCaptureBase.snap.��r����r;���r����)r����r����r����r����__annotations__�abc�abstractmethodr����r����r����r����r����r����r����r����r|���r;���r9���r����r������s?���������������������$�3��$�4��$��$��$����$�� ��$��$��$����$�� ��$��$��$����$�� ��$��$��$����$�� ��$��$��$����$�� ��$�V��$���$��$��$����$�� ��$�f��$��$��$����$��$��$r;���r����r_���r`���ra���)r�����������c��������������������^�����e�Zd�ZdZdeddfd�Zd d�Zd d�Zd d�Zd d �Z de fd �Zde ddfd�ZdS�)� NoCapturer����r#���r(���Nc�����������������������d�S�r~���r|���r����s��� r9���r����zNoCapture.__init__9��r����r;���c�����������������������d�S�r~���r|���r����s��� r9���r����zNoCapture.start<��r����r;���c�����������������������d�S�r~���r|���r����s��� r9���r����zNoCapture.done?��r����r;���c�����������������������d�S�r~���r|���r����s��� r9���r����zNoCapture.suspendB��r����r;���c�����������������������d�S�r~���r|���r����s��� r9���r����zNoCapture.resumeE��r����r;���c�����������������������dS��Nr����r|���r����s��� r9���r����zNoCapture.snapH��s�������rr;���r����c�����������������������d�S�r~���r|���r����s��� r9���r����zNoCapture.writeorgK��r����r;���r����) r����r����r����r����r����r����r����r����r����r����r����r����r����r|���r;���r9���r����r����6��s����������������L� �3�� �4�� �� �� �� � �� �� �� � �� �� �� � �� �� �� � �� �� �� ��c��������� �S�� �T�� �� �� �� �� �� r;���r����c������������ �������������e�Zd�Z �ddd�dedee���������deddfd�Zd edefd �Z defd�Z ded eedf���������ddfd�Zdd�Z dd�Zdd�Zdd�ZdS�)�SysCaptureBaseNF��teer#����tmpfiler ��r(���c�����������������������t�����������|���������}t����������t����������|������������|�_��������||�_��������|�9|dk����rt������������������������}n$|st ������������������������nt����������|�j��������������������}||�_��������d|�_ ��������d�S�)Nr_����initialized) �patchsysdict�getattrr$����_oldr����r����r����r����r ���_state)r����r#���r ��r ��r����s��� r9���r����zSysCaptureBase.__init__P��so��������B���#�C��.�.�� ��� ��?��w���+�-�-���-0�M�)�+�+�+�l�4�9�6M�6M�����#����r;���� class_namec�����������������������d����������������������||�j��������t����������|�d������������rt����������|�j��������������������pd|�j��������|�j��������������������S��Nz(<{} {} _old={} _state={!r} tmpfile={!r}>r��z<UNSET>)�formatr����r\���r���r��r��r ��)r����r��s��� r9���r���zSysCaptureBase.repr^��sK������9�@�@���I��D�&�!�!�5�d�4�9�o�o�B���K��L� �� �� r;���c�����������������������d����������������������|�j��������j��������|�j��������t ����������|�d������������rt����������|�j��������������������pd|�j��������|�j��������������������S�r��) r��r����r����r����r\���r���r��r��r ��r����s��� r9����__repr__zSysCaptureBase.__repr__g��sP������9�@�@��N�#��I��D�&�!�!�5�d�4�9�o�o�B���K��L� �� �� r;����op�states.c�����������������������|�j���������|v�s7J�d���������������������||�j���������d���������������������|���������������������������������������d�S��Nz+cannot {} in state {!r}: expected one of {}z, �r��r���join�r����r��r��s��� r9���� _assert_statezSysCaptureBase._assert_statep���K�������K�6�!�!�!�8�?�?����T�Y�Y�v�.�.� �� �� "�!�!�!�!r;���c�����������������������|�����������������������dd�������������t����������t����������|�j��������|�j���������������������d|�_��������d�S�)Nr�����r���started)r���setattrr$���r����r ��r��r����s��� r9���r����zSysCaptureBase.startw��s:���������7�$4�5�5�5���T�Y���-�-�-�����r;���c������������������������|�����������������������dd�������������|�j��������dk����rd�S�t����������t����������|�j��������|�j���������������������|�`|�j��������������������������������������������d|�_��������d�S�)Nr�����r��r"��� suspendedr����)r��r��r#��r$���r����r��r ��r����r����s��� r9���r����zSysCaptureBase.done|��se���������6�#R�S�S�S��;�&� � ��F���T�Y�� �*�*�*��I������������r;���c�����������������������|�����������������������dd�������������t����������t����������|�j��������|�j���������������������d|�_��������d�S��Nr�����r"��r&��r&��)r��r#��r$���r����r��r��r����s��� r9���r����zSysCaptureBase.suspend���s:���������9�&>�?�?�?���T�Y�� �*�*�*�!����r;���c�����������������������|�����������������������dd�������������|�j��������dk����rd�S�t����������t����������|�j��������|�j���������������������d|�_��������d�S��Nr����r)��r"��)r��r��r#��r$���r����r ��r����s��� r9���r����zSysCaptureBase.resume���sL���������8�%=�>�>�>��;�)�#�#��F���T�Y���-�-�-�����r;���r~���r����)r����r����r����r����r���r���r����r����r����r���r��r���r��r����r����r����r����r|���r;���r9���r��r��O��s �������������37�$�HM�$��$��$��$� (�� 0�$�AE�$� �$��$��$��$� �s�� �s�� �� �� �� � �#�� �� �� �� � ��� �U�3��8�_�� ��� �� �� �� � �� �� �� � �������"��"��"��"� �� �� �� �� �� r;���r��c��������������������.�����e�Zd�ZdZdefd�Zdeddfd�ZdS�)�SysCaptureBinaryr;���r(���c����������������������|�����������������������dd�������������|�j�����������������������������d�������������|�j��������j�������������������������������������������}|�j�����������������������������d�������������|�j��������������������������������������������|S��Nr����r)��r����r��r ��r����rF���r����r�����r�����ress��� r9���r����zSysCaptureBinary.snap����t���������6�#;�<�<�<�����!�����l�!�&�&�(�(������!������������ r;���r����Nc������������������������|�����������������������dd�������������|�j��������������������������������������������|�j��������j�����������������������������|�������������|�j��������j��������������������������������������������d�S��Nr����r)��)r��r��r����rF���rs���r����s��� r9���r����zSysCaptureBinary.writeorg���sa���������:�'?�@�@�@�� ������� ����t�$�$�$�� ���� � � � � r;���)r����r����r����r�����bytesr����r����r|���r;���r9���r-��r-�����sV���������������L��e���������!�U��!�t��!��!��!��!��!��!r;���r-��c��������������������.�����e�Zd�ZdZdefd�Zdeddfd�ZdS�)� SysCapturer����r(���c����������������������|�����������������������dd�������������t����������|�j��������t����������������������sJ��|�j�������������������������������������������}|�j�����������������������������d�������������|�j��������������������������������������������|S�r/��)r��r]���r ��r����r����r����r����r1��s��� r9���r����zSysCapture.snap���ss���������6�#;�<�<�<��$�,� �2�2�2�2�2��l�#�#�%�%������!������������ r;���r����Nc�����������������������|�����������������������dd�������������|�j�����������������������������|�������������|�j��������������������������������������������d�S�r5��)r��r��rs���r����r����s��� r9���r����zSysCapture.writeorg���sE���������:�'?�@�@�@�� �������� �������r;���)r����r����r����r����r����r����r����r|���r;���r9���r8��r8�����sV���������������L��c����������S���T������������r;���r8��c��������������������n�����e�Zd�Zdeddfd�Zdefd�Zdedeedf���������ddfd �Zdd �Z dd�Z dd�Zdd �ZdS�)� FDCaptureBase�targetfdr(���Nc������������������r����||�_��������� �t����������j��������|�������������d�|�_��������nX#�t����������$�rK�t����������j��������t����������j��������t����������j��������������������|�_��������t����������j��������|�j��������|�������������Y�nw�xY�wt����������j ��������|������������|�_ ��������|dk����r5t����������t����������j��������d�������������|�_��������t����������|������������|�_ ��������n_t����������t����������d�������������dddd�������������|�_��������|t ����������v�rt����������||�j��������������������|�_ ��������nt#����������|������������|�_ ��������d |�_��������d�S�) Nr����utf-8)rQ���)rW���r����r����T)rQ���rR���r����r����r��)r=��rN����fstat�targetfd_invalidr����rM����devnull�O_RDWR�dup2rO���� targetfd_saver ��r8��� syscapturer{���r���r ��r����r��)r����r=��s��� r9���r����zFDCaptureBase.__init__���s-����� �� � )��H�X���� �%)�D�!�!����� 5�� 5�� 5��46�7�2�:�r�y�3Q�3Q�D�!��G�D�)�8�4�4�4�4�4� 5���� � �V�H�-�-����q�=�=��� �W�=�=�=�D�L�0:�8�0D�0D�D�O�O�&���*�*�*� � ��"������D�L���<�'�'�",�X�t�|�"D�"D����"+�H�"5�"5���#����s����%��AA:�9A:c������������������p�����d����������������������|�j��������j��������|�j��������|�j��������|�j��������|�j��������������������S�)Nz)<{} {} oldfd={} _state={!r} tmpfile={!r}>)r��r����r����r=��rE��r��r ��r����s��� r9���r��zFDCaptureBase.__repr__���s7������:�A�A��N�#��M����K��L� �� �� r;���r��r��.c�����������������������|�j���������|v�s7J�d���������������������||�j���������d���������������������|���������������������������������������d�S�r��r��r��s��� r9���r��zFDCaptureBase._assert_state���r��r;���c������������������������|�����������������������dd�������������t����������j��������|�j�������������������������������������������|�j���������������������|�j��������������������������������������������d|�_��������dS�)z4Start capturing on targetfd using memorized tmpfile.r����r!��r"��N) r��rN���rD��r ��rP���r=��rF��r����r��r����s��� r9���r����zFDCaptureBase.start���sZ���������7�$4�5�5�5� ����#�#�%�%�t�}�5�5�5������������r;���c����������������������|�����������������������dd�������������|�j��������dk����rdS�t����������j��������|�j��������|�j���������������������t����������j��������|�j���������������������|�j���������B|�j��������|�j��������k����rt����������j��������|�j���������������������t����������j��������|�j���������������������|�j��������� �����������������������������������|�j ��������������������������������������������d|�_��������dS�)z_Stop capturing, restore streams, return original capture file, seeked to position zero.r����r%��N)r��r��rN���rD��rE��r=��r����rA��rF��r����r ��r����s��� r9���r����zFDCaptureBase.done���s�������� ���6�#R�S�S�S��;�&� � ��F� ���"�D�M�2�2�2� ���#�$�$�$�� �,��$�� �5�5�����'�'�'��H�T�*�+�+�+�������������������r;���c������������������������|�����������������������dd�������������|�j��������dk����rd�S�|�j��������������������������������������������t ����������j��������|�j��������|�j���������������������d|�_��������d�S�r(��)r��r��rF��r����rN���rD��rE��r=��r����s��� r9���r����zFDCaptureBase.suspend��sa���������9�&>�?�?�?��;�+�%�%��F�����!�!�!� ���"�D�M�2�2�2�!����r;���c������������������������|�����������������������dd�������������|�j��������dk����rd�S�|�j��������������������������������������������t ����������j��������|�j�������������������������������������������|�j���������������������d|�_��������d�S�r+��) r��r��rF��r����rN���rD��r ��rP���r=��r����s��� r9���r����zFDCaptureBase.resume��sl���������8�%=�>�>�>��;�)�#�#��F����� � � � ����#�#�%�%�t�}�5�5�5�����r;���r����) r����r����r����r����r����r����r��r���r��r����r����r����r����r|���r;���r9���r<��r<�����s���������������'$���'$���'$��'$��'$��'$�R �#�� �� �� �� � ��� �U�3��8�_�� ��� �� �� �� � �� �� �� �������� "��"��"��"� �� �� �� �� �� r;���r<��c��������������������2�����e�Zd�ZdZdZdefd�Zdeddfd�ZdS�)�FDCaptureBinaryzWCapture IO to/from a given OS-level file descriptor. snap() produces `bytes`. r;���r(���c����������������������|�����������������������dd�������������|�j�����������������������������d�������������|�j��������j�������������������������������������������}|�j�����������������������������d�������������|�j��������������������������������������������|S�r/��r0��r1��s��� r9���r����zFDCaptureBinary.snap��r3��r;���r����Nc������������������f�����|�����������������������dd�������������t����������j��������|�j��������|�������������dS�)�"Write to original file descriptor.r����r)��N)r��rN���rs���rE��r����s��� r9���r����zFDCaptureBinary.writeorg'��s4���������:�'?�@�@�@� ���#�T�*�*�*�*�*r;���)r����r����r�����__doc__r����r6��r����r����r|���r;���r9���rN��rN����sb����������������� ��L��e���������+�U��+�t��+��+��+��+��+��+r;���rN��c��������������������2�����e�Zd�ZdZdZdefd�Zdeddfd�ZdS�)� FDCapturezTCapture IO to/from a given OS-level file descriptor. snap() produces text. r����r(���c�����������������������|�����������������������dd�������������|�j�����������������������������d�������������|�j�������������������������������������������}|�j�����������������������������d�������������|�j��������������������������������������������|S�r/��)r��r ��r����r����r����r1��s��� r9���r����zFDCapture.snap5��sq���������6�#;�<�<�<�����!�����l���!�!������!������������ r;���r����Nc�����������������������|�����������������������dd�������������t����������j��������|�j��������|���������������������d�������������������������dS�)rQ��r����r)��r?��N)r��rN���rs���rE���encoder����s��� r9���r����zFDCapture.writeorg=��s@���������:�'?�@�@�@� ���#�T�[�[��%9�%9�:�:�:�:�:r;���)r����r����r����rR��r����r����r����r����r|���r;���r9���rT��rT��-��sb����������������� ��L��c���������;�S��;�T��;��;��;��;��;��;r;���rT��)��������c��������������������(�����e�Zd�ZU�dZeed<���eed<���dS�)� CaptureResult�2The result of :method:`CaptureFixture.readouterr`.rw���rx���N)r����r����r����rR��r���r����r|���r;���r9���r[��r[��J��s(����������������@�@� ���� �����r;���r[��c�������������������������e�Zd�ZdZdZdS�)r[��r\��r|���N)r����r����r����rR��r����r|���r;���r9���r[��r[��S��s��������������� A�@�� � � r;���rw���rx���c��������������������������e�Zd�ZdZdZdeee������������������deee������������������deee������������������ddfd�Zde fd�Z dd �Zdeeef���������fd �Z ddeddfd�Zdd�Zdd �Zdefd�Zdee���������fd�ZdS�)�MultiCaptureNF�in_rw���rx���r(���c������������������0�����||�_���������||�_��������||�_��������d�S�r~����r`��rw���rx���)r����r`��rw���rx���s��� r9���r����zMultiCapture.__init___��s�������36���25���25����r;���c������������������f�����d����������������������|�j��������|�j��������|�j��������|�j��������|�j��������������������S�)NzH<MultiCapture out={!r} err={!r} in_={!r} _state={!r} _in_suspended={!r}>)r��rw���rx���r`��r��� _in_suspendedr����s��� r9���r��zMultiCapture.__repr__i��s4������Y�`�`��H��H��H��K��� �� �� r;���c������������������������d|�_���������|�j��������r|�j��������������������������������������������|�j��������r|�j��������������������������������������������|�j��������r|�j��������������������������������������������d�S�d�S�)Nr"��)r��r`��r����rw���rx���r����s��� r9����start_capturingzMultiCapture.start_capturingr��sm����������8�� ��H�N�N�����8�� ��H�N�N�����8�� ��H�N�N������ �� r;���c������������������������|�������������������������������������\��}}|r#|�j���������J��|�j�����������������������������|�������������|r#|�j���������J��|�j�����������������������������|�������������||fS�)z?Pop current snapshot out/err capture and flush to orig streams.)� readouterrrw���r����rx����r����rw���rx���s��� r9����pop_outerr_to_origzMultiCapture.pop_outerr_to_orig{��sv�������?�?�$�$���S��� #��8�'�'�'��H���c�"�"�"��� #��8�'�'�'��H���c�"�"�"��C�x�r;���c������������������������d|�_���������|�j��������r|�j��������������������������������������������|�j��������r|�j��������������������������������������������|r)|�j��������r$|�j��������������������������������������������d|�_��������d�S�d�S�d�S�)Nr&��T)r��rw���r����rx���r`��rd���r����r`��s��� r9����suspend_capturingzMultiCapture.suspend_capturing���s�������!����8�� ��H�������8�� ��H�������� &�4�8�� &��H������!%�D���� &�� &�� &�� &r;���c�����������������������d|�_���������|�j��������r|�j��������������������������������������������|�j��������r|�j��������������������������������������������|�j��������r+|�j���������J��|�j��������������������������������������������d|�_��������d�S�d�S�)Nr"��F)r��rw���r����rx���rd��r`��r����s��� r9����resume_capturingzMultiCapture.resume_capturing���s�����������8�� ��H�O�O�����8�� ��H�O�O������� '��8�'�'�'��H�O�O����!&�D���� '�� 'r;���c����������������������|�j���������dk����rt����������d�������������d|�_���������|�j��������r|�j��������������������������������������������|�j��������r|�j��������������������������������������������|�j��������r|�j��������������������������������������������dS�dS�)z+Stop capturing and reset capturing streams.�stoppedzwas already stoppedN)r��� ValueErrorrw���r����rx���r`��r����s��� r9����stop_capturingzMultiCapture.stop_capturing���s~�������;�)�#�#��2�3�3�3�����8�� ��H�M�M�O�O�O��8�� ��H�M�M�O�O�O��8�� ��H�M�M�O�O�O�O�O� �� r;���c�����������������������|�j���������dk����S�)z7Whether actively capturing -- not suspended or stopped.r"��)r��r����s��� r9���� is_startedzMultiCapture.is_started���s�������{�i�'�'r;���c�����������������������|�j���������r|�j��������������������������������������������nd}|�j��������r|�j�������������������������������������������nd}t����������||������������S�r��)rw���r����rx���r[��ri��s��� r9���rh��zMultiCapture.readouterr���sF������!%��1�d�h�m�m�o�o�o�r��!%��1�d�h�m�m�o�o�o�r���S�#�&�&�&r;���r�����F)r����r����r����r��rd��r���r����r���r����r����r��rf��r���rj��r����rm��ro��rs��ru��r[��rh��r|���r;���r9���r_��r_��[��sS������������� �F��M�6� �k�&�)� *�6���k�&�)� *�6���k�&�)� *� 6� � �6��6��6��6� �#�� �� �� �� �������� �E�&�&�.�$9�� �� �� �� �&��&�T��&�d��&��&��&��&� '�� '�� '�� '� �� �� �� �(�D��(��(��(��(�'�M�&�1��'��'��'��'��'��'r;���r_��r,����_CaptureMethodc����������������������|�dk����r9t����������t����������d������������t����������d������������t����������d�������������������������S�|�dk����r9t����������t����������d������������t����������d������������t����������d�������������������������S�|�dk����rt����������d�d�d��������������S�|�dk����r0t����������d�t����������dd � ������������t����������dd � �������������������������S�t����������d|����������������)Nr#���r���r����r����rb��r$���r%���r&���Tr��zunknown capturing method: )r_��rT��r8��rr��)r,���s��� r9����_get_multicapturerz�����s������� ��~�~�� �!���)�A�,�,�I�a�L�L�Q�Q�Q�Q� �5���� �1� � �:�a�=�=�j�QR�m�m�T�T�T�T� �4�����$�D�9�9�9�9� �9� � ���*�Q�D�1�1�1�z�!��7N�7N�7N� �� �� �� ���<�&�<�<� =� =�=r;���c������������������������e�Zd�ZdZd*d�Zdefd�Zdeeef���������fd�Z defd �Z d+d �Zd+d�Zd+d�Z d,deddfd�Zd,deddfd�Zd+d�Zdee���������fd�Zd-d�Zd+d�Zd+d�Zd+d�Zd+d�Zd+d�Zej��������ded���������fd���������������Zej��������dededed���������fd���������������Z�ed �!������������d"e fd#���������������Z!�ed �!������������deded���������fd$���������������Z"�ed �!������������deded���������fd%���������������Z#�ed �!������������deded���������fd&���������������Z$�ed �'������������d+d(���������������Z%�ed �'������������d+d)���������������Z&dS�).rk���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. r,���rx��r(���Nc������������������0�����||�_���������d�|�_��������d�|�_��������d�S�r~���)�_method�_global_capturing�_capture_fixture)r����r,���s��� r9���r����zCaptureManager.__init__���s������$���>B���?C����r;���c������������������N�����d����������������������|�j��������|�j��������|�j��������������������S�)NzJ<CaptureManager _method={!r} _global_capturing={!r} _capture_fixture={!r}>)r��r}��r~��r��r����s��� r9���r��zCaptureManager.__repr__���s)������[�b�b��L�$�0�$�2G� �� �� r;���c������������������h�����|�������������������������������������rdS�|�j��������rd|�j��������j��������j��������z��S�dS�)N�globalz fixture %sF)�is_globally_capturingr���request�fixturenamer����s��� r9����is_capturingzCaptureManager.is_capturing���s@�������%�%�'�'�� ��8�� �� L��$�"7�"?�"K�K�K��ur;���c�����������������������|�j���������dk����S�)Nr%���)r}��r����s��� r9���r���z$CaptureManager.is_globally_capturing���s�������|�t�#�#r;���c������������������|�����|�j����������J��t����������|�j��������������������|�_���������|�j���������������������������������������������d�S�r~���)r~��rz��r}��rf��r����s��� r9���ro���z%CaptureManager.start_global_capturing���s>�������%�-�-�-�!2�4�<�!@�!@�����.�.�0�0�0�0�0r;���c�����������������������|�j����������;|�j���������������������������������������������|�j���������������������������������������������d�|�_���������d�S�d�S�r~���)r~��rj��rs��r����s��� r9���rn���z$CaptureManager.stop_global_capturing���sK�������!�-��"�5�5�7�7�7��"�1�1�3�3�3�%)�D�"�"�"��.�-r;���c������������������J�����|�j����������|�j���������������������������������������������d�S�d�S�r~���)r~��ro��r����s��� r9����resume_global_capturez$CaptureManager.resume_global_capture���s0��������!�-��"�3�3�5�5�5�5�5��.�-r;���Fr`��c������������������N�����|�j����������|�j������������������������������|��������������d�S�d�S�)N�r`��)r~��rm��rl��s��� r9���rp���z%CaptureManager.suspend_global_capture���s3�������!�-��"�4�4��4�=�=�=�=�=��.�-r;���c������������������X�����|��������������������������������������|����������������������|�������������d�S�r~���)�suspend_fixturerp���rl��s��� r9���r����zCaptureManager.suspend��s.�������������#�#�C�(�(�(�(�(r;���c������������������V�����|��������������������������������������|�������������������������������������d�S�r~���)r����resume_fixturer����s��� r9���r����zCaptureManager.resume��s,�������"�"�$�$�$��������r;���c������������������F�����|�j����������J��|�j��������������������������������������������S�r~���)r~��rh��r����s��� r9���rr���z"CaptureManager.read_global_capture ��s&�������%�1�1�1��%�0�0�2�2�2r;����capture_fixture�CaptureFixture[Any]c�����������������������|�j���������rK|�j���������j��������j��������}|j��������j��������}|j�����������������������������d���������������������||�������������������������||�_���������d�S�)Nz%cannot use {} and {} at the same time)r��r���r���� raiseerrorr��)r����r����current_fixture�requested_fixtures��� r9����set_fixturezCaptureManager.set_fixture��sj������� �� �"�3�;�G�O� /� 7� C���#�.�.�7�>�>�%����� �� �� � �!0����r;���c�����������������������d�|�_���������d�S�r~���)r��r����s��� r9���� unset_fixturezCaptureManager.unset_fixture��s������ $����r;���c������������������J�����|�j���������r|�j���������������������������������������������dS�dS�)z|If the current item is using ``capsys`` or ``capfd``, activate them so they take precedence over the global capture.N)r���_startr����s��� r9����activate_fixturezCaptureManager.activate_fixture��s4�������� �� +��!�(�(�*�*�*�*�*� +�� +r;���c������������������J�����|�j���������r|�j���������������������������������������������dS�dS�)zDDeactivate the ``capsys`` or ``capfd`` fixture of this item, if any.N)r��r����r����s��� r9����deactivate_fixturez!CaptureManager.deactivate_fixture$��s2������� �� *��!�'�'�)�)�)�)�)� *�� *r;���c������������������J�����|�j���������r|�j���������������������������������������������d�S�d�S�r~���)r���_suspendr����s��� r9���r���zCaptureManager.suspend_fixture)��s2������� �� -��!�*�*�,�,�,�,�,� -�� -r;���c������������������J�����|�j���������r|�j���������������������������������������������d�S�d�S�r~���)r���_resumer����s��� r9���r���zCaptureManager.resume_fixture-��s2������� �� ,��!�)�)�+�+�+�+�+� ,�� ,r;����NNNc��������������#������K����|�j���������o|�j��������������������������������������������}|r|�������������������������������������|�j��������o|�j�������������������������������������������}|r|������������������������������������� �dV���|r|�������������������������������������|r|�������������������������������������dS�dS�#�|r|�������������������������������������|r|�������������������������������������w�w�xY�w)zLContext manager to temporarily disable global and current fixture capturing.N)r���_is_startedr���r~��ru��rp���r���r���)r����� do_fixture� do_globals��� r9����global_and_fixture_disabledz*CaptureManager.global_and_fixture_disabled3��s�����������*�R�t�/D�/P�/P�/R�/R� ��� #�� � �"�"�"��*�R�t�/E�/P�/P�/R�/R� ��� *��'�'�)�)�)� &��E�E�E��� -��*�*�,�,�,��� &��#�#�%�%�%�%�%� &�� &����� -��*�*�,�,�,��� &��#�#�%�%�%�%� &���s����0B$��$/C�when�itemc��������������#������K����|��������������������������������������|������������������������������������� �d�V���|�������������������������������������|����������������������d��������������n/#�|�������������������������������������|����������������������d��������������w�xY�w|������������������������������������\��}}|���������������������|d|�������������|���������������������|d|�������������d�S�)NFr���r`���ra���)r���r���r���rp���rr����add_report_section)r����r���r���rw���rx���s��� r9����item_capturezCaptureManager.item_captureD��s������������"�"�$�$�$������� 3��E�E�E��#�#�%�%�%��'�'�E�'�2�2�2�2��� �#�#�%�%�%��'�'�E�'�2�2�2�2�����+�+�-�-���S�����h��4�4�4�����h��4�4�4�4�4s����A��,BTrd���� collectorc��������������#����j��K����t����������|t����������������������r�|�������������������������������������d�V��}|�������������������������������������|������������������������������������\��}}|�����������������������������������}|r|j�����������������������������d|f�������������|r|j�����������������������������d|f�������������d�S�d�S�d�V���d�S�)NzCaptured stdoutzCaptured stderr)r]���r���r���rp���rr���� get_result�sections�append)r����r���rv���rw���rx����reps��� r9����pytest_make_collect_reportz)CaptureManager.pytest_make_collect_reportT��s������������i��&�&�� ��&�&�(�(�(��e�e�G��'�'�)�)�)��/�/�1�1�H�C���$�$�&�&�C��� >���#�#�%6��$<�=�=�=��� >���#�#�%6��$<�=�=�=�=�=� >�� >�� �E�E�E�E�Er;���c��������������#����p���K����|�����������������������d|������������5��d�V���d�d�d��������������d�S�#�1�swxY�w�Y���d�S�)N�setup�r����r����r���s��� r9����pytest_runtest_setupz#CaptureManager.pytest_runtest_setupc��s����������� � � �w�� -� -�� �� ��E�E�E� �� �� �� �� �� �� �� �� �� �� �� ����� �� �� �� �� �� �����+�/�/c��������������#����p���K����|�����������������������d|������������5��d�V���d�d�d��������������d�S�#�1�swxY�w�Y���d�S�)N�callr���r���s��� r9����pytest_runtest_callz"CaptureManager.pytest_runtest_callh��s����������� � � �v�t� ,� ,�� �� ��E�E�E� �� �� �� �� �� �� �� �� �� �� �� ����� �� �� �� �� �� r���c��������������#����p���K����|�����������������������d|������������5��d�V���d�d�d��������������d�S�#�1�swxY�w�Y���d�S�)N�teardownr���r���s��� r9����pytest_runtest_teardownz&CaptureManager.pytest_runtest_teardownm��s����������� � � �z�4� 0� 0�� �� ��E�E�E� �� �� �� �� �� �� �� �� �� �� �� ����� �� �� �� �� �� r���)�tryfirstc������������������.�����|��������������������������������������d�S�r~����rn���r����s��� r9����pytest_keyboard_interruptz(CaptureManager.pytest_keyboard_interruptr����������"�"�$�$�$�$�$r;���c������������������.�����|��������������������������������������d�S�r~���r���r����s��� r9����pytest_internalerrorz#CaptureManager.pytest_internalerrorv��r���r;���)r,���rx��r(���Nr����rw��)r���r���r(���N)'r����r����r����rR��r����r����r��r���r����r���r���ro���rn���r���rp���r����r����r[��rr���r���r���r���r���r���r���� contextlib�contextmanagerr ���r���r���r���r���r���r���r���r���r���r���r���r|���r;���r9���rk���rk������s�����������������$D��D��D��D� �#�� �� �� �� � �e�C��I�.���������$�t��$��$��$��$�1��1��1��1� *��*��*��*�6��6��6��6�>��>�$��>�4��>��>��>��>�)��)�4��)�D��)��)��)��)� �������3�]�3�%7��3��3��3��3� 0�� 0�� 0�� 0�%��%��%��%�+��+��+��+�*��*��*��*� -��-��-��-�,��,��,��,����&�Y�7G�-H��&��&��&����&� ���5���5�D��5�Y�?O�5P��5��5��5����5���X�$�����I�������� �����X�$��������)�<L�2M�������� �����X�$���������;K�1L�������� �����X�$�����D���Y�?O�5P�������� �����X�t����%��%��%����%���X�t����%��%��%����%��%��%r;���rk���c������������ �������������e�Zd�ZdZdd�deee������������������dededdfd �Z dd �Z dd�Zdee���������fd�Z dd �Zdd�Zdefd�Zej��������ded���������fd���������������ZdS�)�CaptureFixturez|Object returned by the :fixture:`capsys`, :fixture:`capsysbinary`, :fixture:`capfd` and :fixture:`capfdbinary` fixtures.F�� _ispytest�captureclassr���r���r(���Nc����������������������t����������|�������������||�_��������||�_��������d�|�_��������|�j��������j��������|�_��������|�j��������j��������|�_��������d�S�r~���)r���r���r����_capturer����� _captured_out� _captured_err)r����r���r���r���s��� r9���r����zCaptureFixture.__init__��sJ������� �y�!�!�!�7C������8<�� �%)�%6�%C���%)�%6�%C����r;���c������������������������|�j����������Xt����������d�|����������������������d������������|����������������������d�������������������������|�_���������|�j���������������������������������������������d�S�d�S�)Nr����r����rb��)r���r_��r���rf��r����s��� r9���r���zCaptureFixture._start���si�������=� �(���%�%�a�(�(��%�%�a�(�(������D�M� � �M�)�)�+�+�+�+�+� �!� r;���c������������������������|�j����������^|�j��������������������������������������������\��}}|�xj��������|z ��c_��������|�xj��������|z ��c_��������|�j���������������������������������������������d�|�_���������d�S�d�S�r~���)r���rj��r���r���rs��ri��s��� r9���r����zCaptureFixture.close���sp�������=�$��}�7�7�9�9�H�C�����#�%������#�%����M�(�(�*�*�*� �D�M�M�M��%�$r;���c������������������������|�j���������|�j��������}}|�j���������&|�j�������������������������������������������\��}}||z ��}||z ��}|�j��������j��������|�_���������|�j��������j��������|�_��������t ����������||������������S�)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. )r���r���r���rh��r���r����r[��)r�����captured_out�captured_errrw���rx���s��� r9���rh��zCaptureFixture.readouterr���sr�������&*�%7��9K�l���=�$��}�/�/�1�1�H�C���C��L��C��L�!�.�;���!�.�;����\�<�8�8�8r;���c������������������J�����|�j����������|�j���������������������������������������������dS�dS�)z1Suspend this fixture's own capturing temporarily.N)r���rm��r����s��� r9���r���zCaptureFixture._suspend���s,�������=�$��M�+�+�-�-�-�-�-��%�$r;���c������������������J�����|�j����������|�j���������������������������������������������dS�dS�)z0Resume this fixture's own capturing temporarily.N)r���ro��r����s��� r9���r���zCaptureFixture._resume���s,�������=�$��M�*�*�,�,�,�,�,��%�$r;���c������������������F�����|�j����������|�j��������������������������������������������S�dS�)z5Whether actively capturing -- not disabled or closed.NF)r���ru��r����s��� r9���r���zCaptureFixture._is_started���s#�������=�$��=�+�+�-�-�-��ur;���r���c��������������#�������K����|�j���������j��������j�����������������������������d������������}|�����������������������������������5��dV���ddd�������������dS�#�1�swxY�w�Y���dS�)z>Temporarily disable capturing while inside the ``with`` block.rh���N)r����configrj���� getpluginr���)r����� capmanagers��� r9����disabledzCaptureFixture.disabled���s������������&*�\�%8�%F�%P�%P��& ��& � ��� 3� 3� 5� 5�� �� ��E�E�E� �� �� �� �� �� �� �� �� �� �� �� ����� �� �� �� �� �� s����A � A�Ar����)r����r����r����rR��r���r����r���r���r����r����r���r����r[��rh��r���r���r���r���r���r ���r���r|���r;���r9���r���r���{��s7�������������=��=�� �D��D��D��;�v�.�/�D���D� ��D�� � D��D��D��D�,��,��,��,�!��!��!��!�9�M�&�1��9��9��9��9�".��.��.��.� -��-��-��-� �T�������������)�$4�5��������������r;���r���r���c��������������#���� ��K����|�j���������j�����������������������������d������������}t����������t����������|�d�������������}|���������������������|�������������|������������������������������������|V���|������������������������������������|������������������������������������dS�)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" rh���Tr���N) r���rj���r���r���r8��r���r���r����r����r���ru���r���s��� r9����capsysr������s�����������&�%�^�9�C�C�DT�U�U�F�$�Z��D�I�I�I�O� ����'�'�'������� ���������� �������r;���c��������������#���� ��K����|�j���������j�����������������������������d������������}t����������t����������|�d�������������}|���������������������|�������������|������������������������������������|V���|������������������������������������|������������������������������������dS�)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" rh���Tr���N) r���rj���r���r���r-��r���r���r����r���r���s��� r9����capsysbinaryr������s�����������&�%�^�9�C�C�DT�U�U�F�$�%5�w�$�O�O�O�O� ����'�'�'������� ���������� �������r;���c��������������#���� ��K����|�j���������j�����������������������������d������������}t����������t����������|�d�������������}|���������������������|�������������|������������������������������������|V���|������������������������������������|������������������������������������dS�)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" rh���Tr���N) r���rj���r���r���rT��r���r���r����r���r���s��� r9����capfdr�����s�����������&�%�^�9�C�C�DT�U�U�F�$�Y��4�H�H�H�O� ����'�'�'������� ���������� �������r;���c��������������#���� ��K����|�j���������j�����������������������������d������������}t����������t����������|�d�������������}|���������������������|�������������|������������������������������������|V���|������������������������������������|������������������������������������dS�)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" rh���Tr���N) r���rj���r���r���rN��r���r���r����r���r���s��� r9����capfdbinaryr��� ��s�����������(�%�^�9�C�C�DT�U�U�F�$�_�g��N�N�N�O� ����'�'�'������� ���������� �������r;���r����)PrR��r�����collectionsr���rK���rN���r$���r����tempfiler����typesr����typingr���r���r ���r ���r���r���r ���r���r���r���r���r���r���r���r����_pytest.compatr����_pytest.configr���r����_pytest.config.argparsingr����_pytest.deprecatedr����_pytest.fixturesr���r���� _pytest.nodesr���r���r����typing_extensionsr ���r!���rx��r:���rB���rc���ry���rL���r{���r����r����r�����ABCr����r ��r����r����r��r6��r-��r8��r<��rN��rT���version_infor[��� namedtupler_��rz��rk���r���r���r���r���r���r|���r;���r9����<module>r������s������1��1�� � � � ������������������ � � � �� � � � �� � � � ��#��#��#��#��#��#��"��"��"��"��"��"�������������������������������������������������������������������������������������������������������������������������������������������������������������������������� �� �� �� �� �� �������������� �� �� �� �� �� ��!��!��!��!��!��!��#��#��#��#��#��#��,��,��,��,��,��,��-��-��-��-��-��-��$��$��$��$��$��$��'��'��'��'��'��'��#��#��#��#��#��#���������������������������;�'�'�'�'�'�'�)�)�)�)�)�)��9�:�N��V������������&�������51���51�D��51��51��51��51�p� ��d����������������2 1�� 1�� 1�� 1�� 1�"�"�� 1�� 1�� 1� 6��6��6��6��6�� ��6��6��6�$��$��$��$��$�9��$��$��$�I��I��I��I��I���I��I��I�^$��$��$��$��$�#�'�7�6�?��$��$��$�@��x�H�5�5�� �� �� �� �� ��C� �� �� �� �2@ ��@ ��@ ��@ ��@ �[��(��@ ��@ ��@ �F!��!��!��!��!�~�e�,��!��!��!�$�����������$�������"_ ��_ ��_ ��_ ��_ �K��'��_ ��_ ��_ �D+��+��+��+��+�m�E�*��+��+��+�,;��;��;��;��;� �c�"��;��;��;�6���w���-�� ���������� �G�F�O�������U��������������������?�?���������T'��T'��T'��T'��T'�7�6�?��T'��T'��T'�n>�.��>�<��3D��>��>��>��>�"u%��u%��u%��u%��u%��u%��u%��u%�pK��K��K��K��K�W�V�_��K��K��K�b� ��J���9�^�C�-@�$��-L�#M�������� ���6� ��*����>�%�3H�$�PT�3T�)U�������� ���6� ��:���)�N�3�,?��t�,K�"L�������� ���6� ����� �.��2G��t�2S�(T�������� ������r;���