Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib/python3.7/site-packages/tap/plugins/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/tap/plugins/__pycache__/_pytest.cpython-37.opt-1.pyc

B

.��V�
�@s�yddlmZWn ek
r0ddlmZYnXddlZddlmZddlZddlm	Z	ddl
mZddlm
Z
e
�Zdd�Zejjd	d
��Zdd�Zd
d�Zdd�ZdS)�)�StringION)�TerminalWriter)�format_as_diagnostics)�_)�TrackercCsh|jddd�}|jdddtd�d�|jd	ddtd
�d�|jdddtd�d�|jd
dtd�d�dS)z%Include all the command line options.zterminal reportingZgeneral)Zafterz--tap-streamF�
store_truez<Stream TAP output instead of the default test runner output.)�default�action�helpz--tap-filesz?Store all TAP test results into individual files per test case.z--tap-combinedz7Store all TAP test results into a combined output file.z--tap-outdir�pathzhAn optional output directory to write TAP files to. If the directory does not exist, it will be created.)�metavarr
N)ZgetgroupZ	addoptionr)�parser�group�r�D/opt/alt/python37/lib/python3.7/site-packages/tap/plugins/_pytest.py�pytest_addoptions



rcCsF|jjt_|jjt_|jjrB|j�d�}|j�	|�dt_
tjt_
dS)z(Set all the options before the test run.ZterminalreporterTN)�optionZ
tap_outdir�trackerZoutdir�tap_combinedZcombined�
tap_streamZ
pluginmanagerZ	getplugin�
unregisterZ	streaming�sys�stdout�stream)�configZreporterrrr�pytest_configure&s

rcCs�|jdkrdS|jd}|�dd�d}|jdkr@t�||�nV|jdkrdt|�}tj|||d	�n2|jd
kr�|jd�dd�d�	�}t�
|||�dS)z!Add a test result to the tracker.�callN��.�rZpassedZfailed)�diagnosticsZskipped�:)Zwhen�location�splitZoutcomerZadd_ok�_make_as_diagnosticsZ
add_not_okZlongrepr�stripZadd_skip)�reportZdescriptionZtestcaser �reasonrrr�pytest_runtest_logreport2s




r(cCs0t�}t|d�}|�|�|���d�}t|�S)z)Format a report as TAP diagnostic output.)�fileT)rrZ
toterminal�getvalue�
splitlinesr)r&�outZtw�linesrrrr$Bs


r$cCs$|jjs|jjs|jjr t��dS)zDump the results.N)rrZ	tap_filesrrZgenerate_tap_reports)rrrr�pytest_unconfigureKsr.)Z	cStringIOr�ImportError�iorZpy.iorZpytestZ
tap.formatterrZtap.i18nrZtap.trackerrrrZmarkZtrylastrr(r$r.rrrr�<module>s