diff options
author | Daniel Hahler <git@thequod.de> | 2019-05-16 16:30:40 +0200 |
---|---|---|
committer | Daniel Hahler <git@thequod.de> | 2019-05-17 18:17:14 +0200 |
commit | 93fd9debe34bbd6dedfa52d3ffc631c201b23b6e (patch) | |
tree | a7356dae9ac55d7edb3256c1bffc4ff05603eec9 /testing/test_config.py | |
parent | d94b4b031ffb1e1d47a6498c1552d0d5cb7a6d6a (diff) | |
download | pytest-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.py | 11 |
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 *"]) |