File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -1648,7 +1648,7 @@ def test_raise_assertion_error():
1648
1648
)
1649
1649
1650
1650
1651
- def test_raise_assertion_error_raisin_repr (pytester : Pytester ) -> None :
1651
+ def test_raise_assertion_error_raising_repr (pytester : Pytester ) -> None :
1652
1652
pytester .makepyfile (
1653
1653
"""
1654
1654
class RaisingRepr(object):
@@ -1659,9 +1659,15 @@ def test_raising_repr():
1659
1659
"""
1660
1660
)
1661
1661
result = pytester .runpytest ()
1662
- result .stdout .fnmatch_lines (
1663
- ["E AssertionError: <unprintable AssertionError object>" ]
1664
- )
1662
+ if sys .version_info >= (3 , 11 ):
1663
+ # python 3.11 has native support for un-str-able exceptions
1664
+ result .stdout .fnmatch_lines (
1665
+ ["E AssertionError: <exception str() failed>" ]
1666
+ )
1667
+ else :
1668
+ result .stdout .fnmatch_lines (
1669
+ ["E AssertionError: <unprintable AssertionError object>" ]
1670
+ )
1665
1671
1666
1672
1667
1673
def test_issue_1944 (pytester : Pytester ) -> None :
You can’t perform that action at this time.
0 commit comments