added test for #2920 fix

This commit is contained in:
Roland Puntaier 2017-11-28 17:29:52 +01:00
parent 9b7e4ab0c6
commit 6843d45c51
1 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,5 @@
from __future__ import absolute_import, division, print_function
import sys
import py
import pytest
@ -483,8 +484,11 @@ def test_plugin_preparse_prevents_setuptools_loading(testdir, monkeypatch):
monkeypatch.setattr(pkg_resources, 'iter_entry_points', my_iter)
config = testdir.parseconfig("-p", "no:mytestplugin")
plugin = config.pluginmanager.getplugin("mytestplugin")
assert plugin is None
config.pluginmanager.import_plugin("mytestplugin")
#from _pytest.config import get_config
#pm = get_config().pluginmanager
#pm.import_plugin("mytestplugin")
assert "mytestplugin" not in sys.modules
def test_cmdline_processargs_simple(testdir):