Fix test_error_during_readouterr: syspathinsert is unused
This commit is contained in:
parent
5d9d12a6be
commit
148f2fc72c
|
@ -819,15 +819,15 @@ def test_error_during_readouterr(testdir):
|
||||||
testdir.makepyfile(
|
testdir.makepyfile(
|
||||||
pytest_xyz="""
|
pytest_xyz="""
|
||||||
from _pytest.capture import FDCapture
|
from _pytest.capture import FDCapture
|
||||||
|
|
||||||
def bad_snap(self):
|
def bad_snap(self):
|
||||||
raise Exception('boom')
|
raise Exception('boom')
|
||||||
|
|
||||||
assert FDCapture.snap
|
assert FDCapture.snap
|
||||||
FDCapture.snap = bad_snap
|
FDCapture.snap = bad_snap
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
result = testdir.runpytest_subprocess(
|
result = testdir.runpytest_subprocess("-p", "pytest_xyz", "--version")
|
||||||
"-p", "pytest_xyz", "--version", syspathinsert=True
|
|
||||||
)
|
|
||||||
result.stderr.fnmatch_lines(
|
result.stderr.fnmatch_lines(
|
||||||
["*in bad_snap", " raise Exception('boom')", "Exception: boom"]
|
["*in bad_snap", " raise Exception('boom')", "Exception: boom"]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue