Merge pull request #2075 from pytest-dev/master

Merge master into features after fixing flake8 errors
This commit is contained in:
Bruno Oliveira
2016-11-22 14:10:31 -02:00
committed by GitHub
40 changed files with 307 additions and 8 deletions

View File

@@ -25,8 +25,10 @@ def pytest_configure(config):
if config.option.runxfail:
old = pytest.xfail
config._cleanup.append(lambda: setattr(pytest, "xfail", old))
def nop(*args, **kwargs):
pass
nop.Exception = XFailed
setattr(pytest, "xfail", nop)
@@ -65,6 +67,8 @@ def xfail(reason=""):
""" xfail an executing test or setup functions with the given reason."""
__tracebackhide__ = True
raise XFailed(reason)
xfail.Exception = XFailed