Your IP : 216.73.216.196


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

B

C$�X4�@sHdZddlZddlZdd�Zdd�Zdd�Zd	d
�ZGdd�de�ZdS)
zM log machine-parseable test session result information in a plain
text file.
�NcCs&|�dd�}|jddddddd�dS)	Nzterminal reportingzresultlog plugin optionsz--resultlogz--result-log�store�pathz0DEPRECATED path for machine-readable result log.)�action�metavar�default�help)ZgetgroupZ	addoption)�parser�group�r
�B/opt/alt/python37/lib/python3.7/site-packages/_pytest/resultlog.py�pytest_addoptions
rcCs�|jj}|r~t|d�s~tj�tj�|��}tj�|�s@t�|�t	|dd�}t
||�|_|j�
|j�ddlm}|�d|�dS)NZ
slaveinput�w�r)�
RESULT_LOGZC1)�option�	resultlog�hasattr�osr�dirname�abspath�isdir�makedirs�open�	ResultLog�
_resultlog�
pluginmanager�registerZ_pytest.deprecatedr�warn)�configrr�logfilerr
r
r�pytest_configures
r cCs.t|dd�}|r*|j��|`|j�|�dS)Nr)�getattrr�closerr�
unregister)rrr
r
r�pytest_unconfigures

r$cCs�|��}|djg}|dj}d}xx|dd�D]h}|j}||krb|rV|�d�d}qp|�d�n|�d�d}|j}|ddkr�|��|�|�|}q0Wd	�|�S)
NrFr�:�.�/Tz([�)Z	listchain�name�fspath�append�pop�join)�item�chainZgpathr*Zfspart�nodeZ	newfspathr)r
r
r�generic_path#s&



r1c@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)rcCs||_||_dS)N)rr)�selfrrr
r
r�__init__;szResultLog.__init__cCsFtjjd||f|jd�x&|��D]}tjjd||jd�q$WdS)Nz%s %s)�filez %s)�py�builtin�print_r�
splitlines)r2�testpath�
lettercode�longrepr�liner
r
r�write_log_entry?szResultLog.write_log_entrycCs,t|dd�}|dkr|j}|�|||�dS)NZnodeid)r!r*r=)r2�reportr:r;r9r
r
r�log_outcomeDszResultLog.log_outcomecCs�|jdkr|jrdS|jjj|d�}|d}|dkr@t|j�}n@|dkrNd}n2|jrZd}n&|jrlt|j�}n|jr�t|jd�}|�	|||�dS)N�call)r>r�x�Xr(�)
Zwhen�passedr�hookZpytest_report_teststatus�strr;�failed�skippedr?)r2r>�res�coder;r
r
r�pytest_runtest_logreportJsz"ResultLog.pytest_runtest_logreportcCsF|jsB|jrd}t|j�}n|js&t�d}d|j}|�|||�dS)N�F�Sz	%s:%d: %s)rDrGrFr;rH�AssertionErrorr?)r2r>rJr;r
r
r�pytest_collectreport[s

zResultLog.pytest_collectreportcCsDt|dd�}t|dd�}|dkr.dtj��}|�|dt|��dS)N�	reprcrashrzcwd:%s�!)r!r5r�localr=rF)r2ZexcreprrPrr
r
r�pytest_internalerrorfs
zResultLog.pytest_internalerrorN)	�__name__�
__module__�__qualname__r3r=r?rKrOrSr
r
r
rr:sr)	�__doc__r5rrr r$r1�objectrr
r
r
r�<module>s