diff --git a/_pytest/skipping.py b/_pytest/skipping.py index 228c52935..f2ee41518 100644 --- a/_pytest/skipping.py +++ b/_pytest/skipping.py @@ -57,10 +57,6 @@ def pytest_configure(config): ) -def pytest_namespace(): - return dict(xfail=xfail) - - class XFailed(pytest.fail.Exception): """ raised from an explicit call to pytest.xfail() """ diff --git a/pytest.py b/pytest.py index 95cb8ccc6..c05ed77de 100644 --- a/pytest.py +++ b/pytest.py @@ -18,6 +18,7 @@ __all__ = [ 'yield_fixture', 'fail', 'skip', + 'xfail', 'importorskip', 'exit', 'mark', @@ -43,6 +44,7 @@ from _pytest.debugging import pytestPDB as __pytestPDB from _pytest.recwarn import warns, deprecated_call from _pytest.runner import fail, skip, importorskip, exit from _pytest.mark import MARK_GEN as mark +from _pytest.skipping import xfail set_trace = __pytestPDB.set_trace _preloadplugins() # to populate pytest.* namespace so help(pytest) works