From 23bc9815c4aaf6f247df462dab665f9311e875ca Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Tue, 28 Feb 2017 17:59:48 +0100 Subject: [PATCH] remove pytest_namespace from _pytest.fixtures --- _pytest/fixtures.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/_pytest/fixtures.py b/_pytest/fixtures.py index 621e38057..16481ca1c 100644 --- a/_pytest/fixtures.py +++ b/_pytest/fixtures.py @@ -19,6 +19,11 @@ from _pytest.compat import ( ) def pytest_sessionstart(session): + scopename2class.update({ + 'class': pytest.Class, + 'module': pytest.Module, + 'function': pytest.Item, + }) session._fixturemanager = FixtureManager(session) @@ -45,15 +50,6 @@ def scopeproperty(name=None, doc=None): return decoratescope -def pytest_namespace(): - scopename2class.update({ - 'class': pytest.Class, - 'module': pytest.Module, - 'function': pytest.Item, - }) - return {} - - def get_scope_node(node, scope): cls = scopename2class.get(scope) if cls is None: