Fix test_raising_repr test
Closes #10473 Python <3.11 versions depend on `exceptiongroup>=1.0.0rc8`, and they released version `1.0.1` 6 days ago (2022/11/03) that as a side-effect changed the output of exceptions.
This commit is contained in:
parent
2f33ea87c8
commit
b55e264a67
|
@ -1664,15 +1664,7 @@ def test_raise_assertion_error_raising_repr(pytester: Pytester) -> None:
|
|||
"""
|
||||
)
|
||||
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:
|
||||
|
|
Loading…
Reference in New Issue