diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-04-14 02:31:42 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-04-14 02:31:42 (GMT) |
commit | 584f5cbf16980f21c58bf7ce7e451e022355fa3d (patch) | |
tree | 5fb3623c73a49499d71d382723c283f3b83a8478 /Lib/test/test_json | |
parent | d5aa487cceac54fdf2b5c073157b899b3c8c9c94 (diff) | |
parent | 156285c35f8ff856883f09394653b000331e3e33 (diff) | |
download | cpython-584f5cbf16980f21c58bf7ce7e451e022355fa3d.zip cpython-584f5cbf16980f21c58bf7ce7e451e022355fa3d.tar.gz cpython-584f5cbf16980f21c58bf7ce7e451e022355fa3d.tar.bz2 |
merge 3.3
Diffstat (limited to 'Lib/test/test_json')
-rw-r--r-- | Lib/test/test_json/test_decode.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_json/test_decode.py b/Lib/test/test_json/test_decode.py index 35c02de..591b2e2 100644 --- a/Lib/test/test_json/test_decode.py +++ b/Lib/test/test_json/test_decode.py @@ -91,5 +91,9 @@ class TestDecode: self.assertEqual(self.loads(bom_in_str), '\ufeff') self.assertEqual(self.json.load(StringIO(bom_in_str)), '\ufeff') + def test_negative_index(self): + d = self.json.JSONDecoder() + self.assertRaises(ValueError, d.raw_decode, 'a'*42, -50000) + class TestPyDecode(TestDecode, PyTest): pass class TestCDecode(TestDecode, CTest): pass |