We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 45ba736 + f1f1862 commit 852ca7aCopy full SHA for 852ca7a
testing/test_runner.py
@@ -581,7 +581,14 @@ def test_foo():
581
)
582
result = testdir.runpytest()
583
result.stdout.fnmatch_lines(["*! *Exit: some exit msg !*"])
584
- assert result.stderr.lines == [""]
+ # Assert no output on stderr, except for unreliable ResourceWarnings.
585
+ # (https://github.com/pytest-dev/pytest/issues/5088)
586
+ assert [
587
+ x
588
+ for x in result.stderr.lines
589
+ if not x.startswith("Exception ignored in:")
590
+ and not x.startswith("ResourceWarning")
591
+ ] == [""]
592
assert result.ret == 99
593
594
# It prints to stderr also in case of exit during pytest_sessionstart.
0 commit comments