https://github.com/python/cpython/commit/9e12f3b4adf306b922b1da4763a22e229e2d3a3c commit: 9e12f3b4adf306b922b1da4763a22e229e2d3a3c branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: encukou <[email protected]> date: 2026-07-19T17:16:54+02:00 summary:
[3.13] improve json test coverage (GH-154123) (GH-154133) Add test that covers the except block on line 106 of decoder.py (cherry picked from commit ee1e48ebd8194cd5984714021c4df85dbb93c6df) Co-authored-by: David <[email protected]> files: M Lib/test/test_json/test_decode.py diff --git a/Lib/test/test_json/test_decode.py b/Lib/test/test_json/test_decode.py index e46f1971295354..c8b21b8f582a7e 100644 --- a/Lib/test/test_json/test_decode.py +++ b/Lib/test/test_json/test_decode.py @@ -124,6 +124,10 @@ def test_negative_index(self): d = self.json.JSONDecoder() self.assertRaises(ValueError, d.raw_decode, 'a'*42, -50000) + def test_unterminated_string(self): + d = self.json.JSONDecoder() + self.assertRaises(self.JSONDecodeError, d.raw_decode, '"\\') + def test_limit_int(self): maxdigits = 5000 with support.adjust_int_max_str_digits(maxdigits): _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
