Your IP : 216.73.216.85


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__/setuponly.cpython-37.pyc

B

C$�X�	�@sTddlZddlZdd�Zejdd�dd��Zdd	�Zd
d�Zejdd�d
d��ZdS)�NcCs2|�d�}|jddddd�|jdddd	d�dS)
NZdebugconfigz--setuponlyz--setup-only�
store_truez*only setup fixtures, do not execute tests.)�action�helpz--setupshowz--setup-showz-show setup of fixtures while executing tests.)ZgetgroupZ	addoption)�parser�group�r�B/opt/alt/python37/lib/python3.7/site-packages/_pytest/setuponly.py�pytest_addoptions



r	T)ZhookwrapperccsddV|j}|jjr`t|d�rV|jrNt|j�r>|�|j�|_qV|j|j|_n|j|_t	|d�dS)N�param�SETUP)
�config�option�	setupshow�hasattrZids�callabler
�cached_paramZparam_index�_show_fixture_action)�
fixturedef�requestrrrr�pytest_fixture_setup
s

rcCs6t|d�r2|jj}|jjr2t|d�t|d�r2|`dS)NZ
cached_resultZTEARDOWNr)r�_fixturemanagerrr
rrr)rrrrr�pytest_fixture_post_finalizer s


rcCs�|jj}|j�d�}|r$|��\}}|��}|��|�d|j�|�dj	|�
d�|jd��|j
d��|dkr�tdd	�|jD��}|r�|�d
�	d�|���t|d�r�|�d
�	|j��|r�|��tj�|�tj�|�dS)NZcapturemanagerz  z{step} {scope} {fixture}�r)�step�scopeZfixturercss|]}|dkr|VqdS)rNr)�.0�argrrr�	<genexpr>8sz'_show_fixture_action.<locals>.<genexpr>z (fixtures used: {0})z, rz[{0}])rrZ
pluginmanagerZ	getpluginZsuspendcaptureZget_terminal_writer�line�writeZscopenum�format�ljustr�upper�argname�sorted�argnames�joinrrZ
resumecapture�sys�stdout�stderr)r�msgrZcapman�out�errZtw�depsrrrr)s*
r)ZtryfirstcCs|jjrd|j_dS)NT)r
Z	setuponlyr)rrrr�pytest_cmdline_mainEsr.)�pytestr'r	Zhookimplrrrr.rrrr�<module>s