terminal: handle "capture" option not being available

This is the case with `-p no:capture` now.
This commit is contained in:
Daniel Hahler
2019-03-20 02:27:47 +01:00
parent 415899d428
commit c7c120fba6
2 changed files with 3 additions and 3 deletions

View File

@@ -1182,7 +1182,7 @@ def test_help_and_version_after_argument_error(testdir):
def test_config_does_not_load_blocked_plugin_from_args(testdir):
"""This tests that pytest's config setup handles "-p no:X"."""
p = testdir.makepyfile("def test(capfd): pass")
result = testdir.runpytest(str(p), "-pno:capture", "--tb=native")
result = testdir.runpytest(str(p), "-pno:capture")
result.stdout.fnmatch_lines(["E fixture 'capfd' not found"])
assert result.ret == EXIT_TESTSFAILED