|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /opt/alt/python37/lib/python3.7/site-packages/nose/plugins/__pycache__/ |
Upload File : |
B
9�`$
� @ sn d Z ddlZddlZddlZddlmZ ddlmZmZ ddl m
Z
ddlmZ e�
e�ZG dd� de�ZdS ) 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 @ s� e Zd ZdZdZdZdZdZdd� Zdd � Z d
d� Z
dd
� Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zeed d d!�Zd S )"�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.
TZNOSE_NOCAPTURE�capturei@ c C s g | _ d | _d S )N)�stdout�_buf)�self� r �E/opt/alt/python37/lib/python3.7/site-packages/nose/plugins/capture.py�__init__# s zCapture.__init__c C s$ |j ddd|�| j� ddd� dS )z%Register commandline options
z-sz--nocaptureZstore_falser zUDon't capture stdout (any stdout output will be printed immediately) [NOSE_NOCAPTURE])�action�default�dest�helpN)Z
add_option�get�env_opt)r �parser�envr r r
�options'