tests: harden test_disabled_capture_fixture

This commit is contained in:
Daniel Hahler 2019-10-26 22:54:11 +02:00
parent a92f49afa7
commit 81c3bc76bc
1 changed files with 1 additions and 5 deletions

View File

@ -605,11 +605,7 @@ class TestCaptureFixture:
) )
args = ("-s",) if no_capture else () args = ("-s",) if no_capture else ()
result = testdir.runpytest_subprocess(*args) result = testdir.runpytest_subprocess(*args)
result.stdout.fnmatch_lines( result.stdout.fnmatch_lines(["*while capture is disabled*", "*= 2 passed in *"])
"""
*while capture is disabled*
"""
)
result.stdout.no_fnmatch_line("*captured before*") result.stdout.no_fnmatch_line("*captured before*")
result.stdout.no_fnmatch_line("*captured after*") result.stdout.no_fnmatch_line("*captured after*")
if no_capture: if no_capture: