summaryrefslogtreecommitdiff
path: root/testing/test_config.py
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-05-16 16:30:40 +0200
committerDaniel Hahler <git@thequod.de>2019-05-17 18:17:14 +0200
commit93fd9debe34bbd6dedfa52d3ffc631c201b23b6e (patch)
treea7356dae9ac55d7edb3256c1bffc4ff05603eec9 /testing/test_config.py
parentd94b4b031ffb1e1d47a6498c1552d0d5cb7a6d6a (diff)
downloadpytest-93fd9debe34bbd6dedfa52d3ffc631c201b23b6e.tar.gz
Allow disabling of python plugin
Fixes https://github.com/pytest-dev/pytest/issues/5277.
Diffstat (limited to 'testing/test_config.py')
-rw-r--r--testing/test_config.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/test_config.py b/testing/test_config.py
index ecb8fd403..cee3c6403 100644
--- a/testing/test_config.py
+++ b/testing/test_config.py
@@ -1228,6 +1228,17 @@ def test_config_blocked_default_plugins(testdir, plugin):
p = testdir.makepyfile("def test(): pass")
result = testdir.runpytest(str(p), "-pno:%s" % plugin)
+
+ if plugin == "python":
+ assert result.ret == EXIT_USAGEERROR
+ result.stderr.fnmatch_lines(
+ [
+ "ERROR: not found: */test_config_blocked_default_plugins.py",
+ "(no name '*/test_config_blocked_default_plugins.py' in any of [])",
+ ]
+ )
+ return
+
assert result.ret == EXIT_OK
if plugin != "terminal":
result.stdout.fnmatch_lines(["* 1 passed in *"])