Update test to confirm expected behavior

This commit is contained in:
acjreno 2023-04-14 14:50:28 -04:00
parent a5dceb393f
commit 6831dd7aad
1 changed files with 3 additions and 1 deletions

View File

@ -1540,7 +1540,7 @@ class TestGenericReporting:
assert "def test_func2" not in s assert "def test_func2" not in s
def test_tb_crashline_pytrace_false(self, pytester: Pytester, option) -> None: def test_tb_crashline_pytrace_false(self, pytester: Pytester, option) -> None:
pytester.makepyfile( p = pytester.makepyfile(
""" """
import pytest import pytest
def test_func1(): def test_func1():
@ -1550,6 +1550,8 @@ class TestGenericReporting:
result = pytester.runpytest("--tb=line") result = pytester.runpytest("--tb=line")
s = result.stdout.str() s = result.stdout.str()
assert "None" not in s 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: def test_pytest_report_header(self, pytester: Pytester, option) -> None:
pytester.makeconftest( pytester.makeconftest(