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.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)�afterz--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.)�metavarrN)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�tracker�outdir�tap_combined�combined�
tap_streamZ
pluginmanagerZ	getplugin�
unregister�	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��.�rZpassed�failed)�diagnostics�skipped�:)Zwhen�location�split�outcomer�add_ok�_make_as_diagnostics�
add_not_okZlongrepr�strip�add_skip)�report�descriptionZtestcaser%�reasonrrr�pytest_runtest_logreport2s




r3cCs0t�}t|d�}|�|�|���d�}t|�S)z)Format a report as TAP diagnostic output.)�fileT)rrZ
toterminal�getvalue�
splitlinesr)r0�outZtw�linesrrrr,Bs


r,cCs$|jjs|jjs|jjr t��dS)zDump the results.N)rrZ	tap_filesrr�generate_tap_reports)rrrr�pytest_unconfigureKsr:)�	cStringIOr�ImportError�iorZpy.ior�pytestZ
tap.formatterr�tap.i18nr�tap.trackerrrr�markZtrylastrr3r,r:rrrr�<module>s