[7.2.x] Fix test_raising_repr test

This commit is contained in:
Bruno Oliveira 2022-11-09 20:20:05 -03:00 committed by pytest bot
parent b2271afa65
commit dbd4c5fb2f
1 changed files with 1 additions and 9 deletions

View File

@ -1664,15 +1664,7 @@ def test_raise_assertion_error_raising_repr(pytester: Pytester) -> None:
""" """
) )
result = pytester.runpytest() result = pytester.runpytest()
if sys.version_info >= (3, 11): result.stdout.fnmatch_lines(["E AssertionError: <exception str() failed>"])
# python 3.11 has native support for un-str-able exceptions
result.stdout.fnmatch_lines(
["E AssertionError: <exception str() failed>"]
)
else:
result.stdout.fnmatch_lines(
["E AssertionError: <unprintable AssertionError object>"]
)
def test_issue_1944(pytester: Pytester) -> None: def test_issue_1944(pytester: Pytester) -> None: