Your IP : 216.73.216.85
B
C$�X� � @ sT d dl Z d dlZdd� Ze jdd�dd� �Zdd � Zd
d� Ze jdd�d
d� �ZdS )� Nc C s2 | � d�}|jddddd� |jdddd d� d S )
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_addoption s
r T)Zhookwrapperc c sd d V |j }|jjr`t|d�rV| jrNt| j�r>| �|j�| _qV| j|j | _n|j| _t | d� d S )N�param�SETUP)
�config�option� setupshow�hasattrZids�callabler
�cached_paramZparam_index�_show_fixture_action)�
fixturedef�requestr r r r �pytest_fixture_setup
s
r c C s6 t | d�r2| jj}|jjr2t| d� t | d�r2| `d S )NZ
cached_resultZTEARDOWNr )r �_fixturemanagerr r
r r r )r r r r r �pytest_fixture_post_finalizer s
r c C s� | j j}|j�d�}|r$|�� \}}|�� }|�� |�d| j � |�dj |�
d�| jd �� | j
d�� |dkr�tdd � | jD ��}|r�|�d
� d�|��� t| d�r�|�d
� | j�� |r�|�� tj�|� tj�|� d S )NZcapturemanagerz z{step} {scope} {fixture}� r )�step�scopeZfixturer c s s | ]}|d kr|V qdS )r Nr )�.0�argr r r � <genexpr>8 s z'_show_fixture_action.<locals>.<genexpr>z (fixtures used: {0})z, r z[{0}])r r Z
pluginmanagerZ getpluginZsuspendcaptureZget_terminal_writer�line�writeZscopenum�format�ljustr �upper�argname�sorted�argnames�joinr r Z
resumecapture�sys�stdout�stderr)r �msgr Zcapman�out�errZtw�depsr r r r ) s*
r )Ztryfirstc C s | j jrd| j _d S )NT)r
Z setuponlyr )r r r r �pytest_cmdline_mainE s r. )�pytestr'