diff --git a/_pytest/runner.py b/_pytest/runner.py index 07f4be019..ee1683042 100644 --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -10,13 +10,6 @@ import pytest from _pytest._code.code import TerminalRepr, ExceptionInfo -def pytest_namespace(): - return { - 'fail' : fail, - 'skip' : skip, - 'importorskip' : importorskip, - 'exit' : exit, - } # # pytest plugin hooks diff --git a/pytest.py b/pytest.py index aca96c143..518b65a38 100644 --- a/pytest.py +++ b/pytest.py @@ -15,7 +15,12 @@ __all__ = [ 'warns', 'deprecated_call', 'fixture', - 'yield_fixture' + 'yield_fixture', + 'fail', + 'skip', + 'importorskip', + 'exit', + ] if __name__ == '__main__': # if run as a script or by 'python -m pytest' @@ -35,8 +40,7 @@ from _pytest.freeze_support import freeze_includes from _pytest import __version__ from _pytest.debugging import pytestPDB as __pytestPDB from _pytest.recwarn import warns, deprecated_call - - +from _pytest.runner import fail, skip, importorskip, exit set_trace = __pytestPDB.set_trace _preloadplugins() # to populate pytest.* namespace so help(pytest) works