Skip to content

Commit f6f422c

Browse files
remove preinit, its no longer needed
1 parent 3578f4e commit f6f422c

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

_pytest/config.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ def directory_arg(path, optname):
9999
return path
100100

101101

102-
_preinit = []
103-
104102
default_plugins = (
105103
"mark main terminal runner python fixtures debugging unittest capture skipping "
106104
"tmpdir monkeypatch recwarn pastebin helpconfig nose assertion "
@@ -111,14 +109,7 @@ def directory_arg(path, optname):
111109
builtin_plugins = set(default_plugins)
112110
builtin_plugins.add("pytester")
113111

114-
115-
def _preloadplugins():
116-
assert not _preinit
117-
_preinit.append(get_config())
118-
119112
def get_config():
120-
if _preinit:
121-
return _preinit.pop(0)
122113
# subsequent calls to main will create a fresh instance
123114
pluginmanager = PytestPluginManager()
124115
config = Config(pluginmanager)

pytest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# else we are imported
88

99
from _pytest.config import (
10-
main, UsageError, _preloadplugins, cmdline,
10+
main, UsageError, cmdline,
1111
hookspec, hookimpl
1212
)
1313
from _pytest.fixtures import fixture, yield_fixture
@@ -74,5 +74,4 @@
7474
else:
7575

7676
from _pytest.compat import _setup_collect_fakemodule
77-
_preloadplugins() # to populate pytest.* namespace so help(pytest) works
7877
_setup_collect_fakemodule()

0 commit comments

Comments
 (0)