remove pytest_namespace from _pytest/assertion

This commit is contained in:
Ronny Pfannschmidt 2017-02-28 13:30:57 +01:00
parent 2a130daae6
commit 5818e65cf3
2 changed files with 2 additions and 3 deletions

View File

@ -25,9 +25,6 @@ def pytest_addoption(parser):
expression information.""")
def pytest_namespace():
return {'register_assert_rewrite': register_assert_rewrite}
def register_assert_rewrite(*names):
"""Register one or more module names to be rewritten on import.

View File

@ -9,6 +9,7 @@ __all__ = [
'hookspec',
'hookimpl',
'__version__',
'register_assert_rewrite'
]
if __name__ == '__main__': # if run as a script or by 'python -m pytest'
@ -22,6 +23,7 @@ from _pytest.config import (
main, UsageError, _preloadplugins, cmdline,
hookspec, hookimpl
)
from _pytest.assertion import register_assert_rewrite
from _pytest import __version__
_preloadplugins() # to populate pytest.* namespace so help(pytest) works