Skip to content

Commit bfffc3d

Browse files
committed
Fix test failure on PyPy
1 parent b104dda commit bfffc3d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/test_ultratb.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,10 @@ class ExceptionMessagePreferenceTest(unittest.TestCase):
445445

446446
def test_jsondecodeerror_message(self):
447447
cell = "import json;json.loads('{\"a\": }')"
448-
expected = "JSONDecodeError: Expecting value: line 1 column 7 (char 6)"
448+
if platform.python_implementation() == "PyPy":
449+
expected = "JSONDecodeError: Unexpected '}': line 1 column 7 (char 6)"
450+
else:
451+
expected = "JSONDecodeError: Expecting value: line 1 column 7 (char 6)"
449452
ip.run_cell("%xmode plain")
450453
with tt.AssertPrints(expected):
451454
ip.run_cell(cell)

0 commit comments

Comments
 (0)