Skip to content

Commit

Permalink
remove preinit, its no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt committed Jul 31, 2017
1 parent f1467f8 commit 34909f2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
9 changes: 0 additions & 9 deletions _pytest/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ def directory_arg(path, optname):
return path


_preinit = []

default_plugins = (
"mark main terminal runner python fixtures debugging unittest capture skipping "
"tmpdir monkeypatch recwarn pastebin helpconfig nose assertion "
Expand All @@ -113,14 +111,7 @@ def directory_arg(path, optname):
builtin_plugins.add("pytester")


def _preloadplugins():
assert not _preinit
_preinit.append(get_config())


def get_config():
if _preinit:
return _preinit.pop(0)
# subsequent calls to main will create a fresh instance
pluginmanager = PytestPluginManager()
config = Config(pluginmanager)
Expand Down
3 changes: 1 addition & 2 deletions pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# else we are imported

from _pytest.config import (
main, UsageError, _preloadplugins, cmdline,
main, UsageError, cmdline,
hookspec, hookimpl
)
from _pytest.fixtures import fixture, yield_fixture
Expand Down Expand Up @@ -74,5 +74,4 @@
else:

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

0 comments on commit 34909f2

Please sign in to comment.