From fab9b993f80ce696e7be41bcd76a415a9fdce7c6 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Tue, 28 Feb 2017 13:34:38 +0100 Subject: [PATCH] remove pytest_namespace from _pytest.freeze_support --- _pytest/config.py | 1 + _pytest/freeze_support.py | 3 --- pytest.py | 5 ++++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/_pytest/config.py b/_pytest/config.py index db37280ca..751098b36 100644 --- a/_pytest/config.py +++ b/_pytest/config.py @@ -101,6 +101,7 @@ default_plugins = ( "junitxml resultlog doctest cacheprovider freeze_support " "setuponly setupplan warnings").split() + builtin_plugins = set(default_plugins) builtin_plugins.add("pytester") diff --git a/_pytest/freeze_support.py b/_pytest/freeze_support.py index 6c2120559..52f86087f 100644 --- a/_pytest/freeze_support.py +++ b/_pytest/freeze_support.py @@ -5,9 +5,6 @@ pytest from __future__ import absolute_import, division, print_function -def pytest_namespace(): - return {'freeze_includes': freeze_includes} - def freeze_includes(): """ diff --git a/pytest.py b/pytest.py index 26667f5e5..741e2d7f6 100644 --- a/pytest.py +++ b/pytest.py @@ -9,7 +9,8 @@ __all__ = [ 'hookspec', 'hookimpl', '__version__', - 'register_assert_rewrite' + 'register_assert_rewrite', + 'freeze_includes', ] if __name__ == '__main__': # if run as a script or by 'python -m pytest' @@ -24,7 +25,9 @@ from _pytest.config import ( hookspec, hookimpl ) from _pytest.assertion import register_assert_rewrite +from _pytest.freeze_support import freeze_includes from _pytest import __version__ + _preloadplugins() # to populate pytest.* namespace so help(pytest) works