Skip to content

Commit

Permalink
Merge pull request pytest-dev#10488 from DanielVZ96/fix-test-raising-…
Browse files Browse the repository at this point in the history
…repr

Fix test_raising_repr test
  • Loading branch information
nicoddemus committed Nov 9, 2022
2 parents 13d6114 + b55e264 commit 54d5a63
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions testing/test_assertion.py
Original file line number Diff line number Diff line change
Expand Up @@ -1664,15 +1664,7 @@ def test_raising_repr():
"""
)
result = pytester.runpytest()
if sys.version_info >= (3, 11):
# 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>"]
)
result.stdout.fnmatch_lines(["E AssertionError: <exception str() failed>"])


def test_issue_1944(pytester: Pytester) -> None:
Expand Down

0 comments on commit 54d5a63

Please sign in to comment.