Skip to content

Commit 6843d45

Browse files
author
Roland Puntaier
committed
added test for #2920 fix
1 parent 9b7e4ab commit 6843d45

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

testing/test_config.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from __future__ import absolute_import, division, print_function
2+
import sys
23
import py
34
import pytest
45

@@ -483,8 +484,11 @@ def load(self):
483484

484485
monkeypatch.setattr(pkg_resources, 'iter_entry_points', my_iter)
485486
config = testdir.parseconfig("-p", "no:mytestplugin")
486-
plugin = config.pluginmanager.getplugin("mytestplugin")
487-
assert plugin is None
487+
config.pluginmanager.import_plugin("mytestplugin")
488+
#from _pytest.config import get_config
489+
#pm = get_config().pluginmanager
490+
#pm.import_plugin("mytestplugin")
491+
assert "mytestplugin" not in sys.modules
488492

489493

490494
def test_cmdline_processargs_simple(testdir):

0 commit comments

Comments
 (0)