Merge pull request #4994 from blueyed/test_as_errors-subprocess
test_as_errors: use subprocess with `-W`
This commit is contained in:
commit
3e1971eb16
|
@ -98,7 +98,9 @@ def test_as_errors(testdir, pyfile_with_warnings, method):
|
|||
filterwarnings=error
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest(*args)
|
||||
# Use a subprocess, since changing logging level affects other threads
|
||||
# (xdist).
|
||||
result = testdir.runpytest_subprocess(*args)
|
||||
result.stdout.fnmatch_lines(
|
||||
[
|
||||
"E UserWarning: user warning",
|
||||
|
|
Loading…
Reference in New Issue