Uname: Linux premium294.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.1.32 [ PHP INFO ] PHP os: Linux
Server Ip: 104.21.48.1
Your Ip: 216.73.216.223
User: mjbynoyq (1574) | Group: mjbynoyq (1570)
Safe Mode: OFF
Disable Function:
NONE

name : capture.cpython-312.pyc
�

���g$
���dZddlZddlZddlZddlmZddlmZmZddl	m
Z
ddlmZeje�ZGd�de�Zy)	a_
This plugin captures stdout during test execution. If the test fails
or raises an error, the captured output will be appended to the error
or failure output. It is enabled by default but can be disabled with
the options ``-s`` or ``--nocapture``.

:Options:
  ``--nocapture``
    Don't capture stdout (any stdout output will be printed immediately)

�N)�Plugin)�exc_to_unicode�
force_unicode)�ln)�StringIOc��eZdZdZdZdZdZdZd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zeeddd�Zy)�Capturea
    Output capture plugin. Enabled by default. Disable with ``-s`` or
    ``--nocapture``. This plugin captures stdout during test execution,
    appending any output captured to the error or failure output,
    should the test fail or raise an error.
    T�NOSE_NOCAPTURE�capturei@c� �g|_d|_y�N)�stdout�_buf��selfs �C/opt/hc_python/lib/python3.12/site-packages/nose/plugins/capture.py�__init__zCapture.__init__#s�������	�c�f�|jddd|j|j�dd��y)z%Register commandline options
        z-sz--nocapture�store_falserzUDon't capture stdout (any stdout output will be printed immediately) [NOSE_NOCAPTURE])�action�default�dest�helpN)�
add_option�get�env_opt)r�parser�envs   r�optionszCapture.options's8��	����-�
�������-�-�I�<�	�	=rc�:�||_|jsd|_yy)z8Configure plugin. Plugin is enabled by default.
        FN)�confr�enabled)rr r"s   r�	configurezCapture.configure0s����	���� �D�L�rc�2�|j�d|_y)zClear capture buffer.
        N)�endr�r�tests  r�	afterTestzCapture.afterTest7s��	
���
���	rc�$�|j�y)z0Replace sys.stdout with capture buffer.
        N��startrs r�beginz
Capture.begin=�
��	
�
�
�rc�$�|j�y)zFlush capture buffer.
        Nr+r's  r�
beforeTestzCapture.beforeTestBr.rc�t�|jx|_}d|_|s|S|\}}}||j||�|fS)z-Add captured output to error report.
        N)�buffer�capturedOutputr�addCaptureToErr)rr(�err�output�ec�ev�tbs       r�formatErrorzCapture.formatErrorGsK��(,�{�{�2���f���	���J��
��B���D�(�(��V�4�b�9�9rc�&�|j||�S)z/Add captured output to failure report.
        )r:)rr(r5s   r�
formatFailurezCapture.formatFailureTs������c�*�*rc�|�t|�}t|�}dj|td�|td�g�S)N�
z>> begin captured stdout <<z>> end captured stdout <<)rr�joinr)rr8r6s   rr4zCapture.addCaptureToErrYsD��
�B�
���v�&���y�y�"�b�!>�?�!�2�&A�#B�D�E�	Erc��|jjtj�t�|_|jt_yr
)r�append�sysrrrs rr,z
Capture.start_s,�������3�:�:�&��J��	��Y�Y��
rc�d�|jr$|jj�t_yyr
)r�poprBrs rr&zCapture.endds ���;�;������*�C�J�rc�X�|jr|j�|jr�yy)zRestore stdout.
        N)rr&)r�results  r�finalizezCapture.finalizehs���k�k��H�H�J��k�krc�P�|j�|jj�Syr
)r�getvaluers r�_get_bufferzCapture._get_bufferns$���9�9� ��9�9�%�%�'�'�!rNzCaptured stdout output.)�__name__�
__module__�__qualname__�__doc__r#r�name�scorerr r$r)r-r0r:r<r4r,r&rGrJ�propertyr2�rrr	r	st����G��G��D��E��=�!���
�
:�+�
E��
+��(��k�4��3�5�Frr	)rN�logging�osrB�nose.plugins.baser�nose.pyversionrr�	nose.utilr�ior�	getLoggerrK�logr	rRrr�<module>r[sC��
��	�
�$�8����g����!��\5�f�\5r
© 2025 XylotrechusZ