Skip to content

Commit 3af2204

Browse files
authored
Fix test failure on PyPy (ipython#14977)
Fixes ipython#14976
2 parents b104dda + bfffc3d commit 3af2204

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)