Skip to content

Commit 34909f2

Browse files
remove preinit, its no longer needed
1 parent f1467f8 commit 34909f2

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
@@ -100,8 +100,6 @@ def directory_arg(path, optname):
100100
return path
101101

102102

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

115113

116-
def _preloadplugins():
117-
assert not _preinit
118-
_preinit.append(get_config())
119-
120-
121114
def get_config():
122-
if _preinit:
123-
return _preinit.pop(0)
124115
# subsequent calls to main will create a fresh instance
125116
pluginmanager = PytestPluginManager()
126117
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)