diff --git a/testing/test_terminal.py b/testing/test_terminal.py index 14a8b3fea..ca6832834 100644 --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -1540,7 +1540,7 @@ class TestGenericReporting: assert "def test_func2" not in s def test_tb_crashline_pytrace_false(self, pytester: Pytester, option) -> None: - pytester.makepyfile( + p = pytester.makepyfile( """ import pytest def test_func1(): @@ -1550,6 +1550,8 @@ class TestGenericReporting: result = pytester.runpytest("--tb=line") s = result.stdout.str() assert "None" not in s + bn = p.name + result.stdout.fnmatch_lines(["*%s:3: Failed: test_func1" % bn]) def test_pytest_report_header(self, pytester: Pytester, option) -> None: pytester.makeconftest(