Your IP : 216.73.216.213
B
C$�Xk5 � @ s d Z ddlZddlZddlZddlZddlZddlmZmZ dd� Z dd� Z
dd � ZG d
d� dejj
�Zd.d
d�Zee_
G dd� d�Zejdd�dd� �Zejjdd� �Zdd� Zdd� Zejdd�dd� �Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zd*d+� Zd,d-� Z dS )/z/ support for skip/xfail functions and markers. � N)�MarkInfo�
MarkDecoratorc C s4 | � d�}|jdddddd� | jdd dd
d� d S )NZgeneralz
--runxfail�
store_true�runxfailFz'run tests even if they are marked xfail)�action�dest�default�help�xfail_strictz\default for the strict parameter of xfail markers when not given explicitly (default: False)�bool)r �type)ZgetgroupZ addoptionZaddini)�parser�group� r �A/opt/alt/python37/lib/python3.7/site-packages/_pytest/skipping.py�pytest_addoption s
r c sd | j jr<tj� | j�� fdd�� dd� }t|_ttd|� | � dd� | � dd� | � dd � d S )
Nc s t td� �S )N�xfail)�setattr�pytestr )�oldr r �<lambda> � z"pytest_configure.<locals>.<lambda>c _ s d S )Nr )�args�kwargsr r r �nop s zpytest_configure.<locals>.nopr �markersz�skip(reason=None): skip the given test function with an optional reason. Example: skip(reason="no way of currently testing this") skips the test.a skipif(condition): skip the given test function if eval(condition) results in a True value. Evaluation happens within the module global context. Example: skipif('sys.platform == "win32"') skips the test if we are on the win32 platform. see http://pytest.org/latest/skipping.htmla� xfail(condition, reason=None, run=True, raises=None, strict=False): mark the test function as an expected failure if eval(condition) has a True value. Optionally specify a reason for better reporting and run=False if you don't even want to execute the test function. If only specific exception(s) are expected, you can list them in raises, and if the test fails in other ways, it will be reported as a true failure. See http://pytest.org/latest/skipping.html)
�optionr r r �_cleanup�append�XFailed� Exceptionr Zaddinivalue_line)�configr r )r r �pytest_configure s r"