From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sun, 19 Jul 2026 15:16:47 +0000 (+0200) Subject: [3.14] improve json test coverage (GH-154123) (GH-154135) X-Git-Url: http://git.ipfire.org/index.cgi?a=commitdiff_plain;h=6839aa8711bbeb089ee0c28e8ccf9aee436a8189;p=thirdparty%2FPython%2Fcpython.git [3.14] improve json test coverage (GH-154123) (GH-154135) Add test that covers the except block on line 106 of decoder.py (cherry picked from commit ee1e48ebd8194cd5984714021c4df85dbb93c6df) Co-authored-by: David --- diff --git a/Lib/test/test_json/test_decode.py b/Lib/test/test_json/test_decode.py index e46f19712953..c8b21b8f582a 100644 --- a/Lib/test/test_json/test_decode.py +++ b/Lib/test/test_json/test_decode.py @@ -124,6 +124,10 @@ class TestDecode: 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):