From 6831dd7aad09a5c53c01a7b38001b9cc692cf0e7 Mon Sep 17 00:00:00 2001 From: acjreno Date: Fri, 14 Apr 2023 14:50:28 -0400 Subject: [PATCH] Update test to confirm expected behavior --- testing/test_terminal.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(