summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_json
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-04-14 02:32:12 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-04-14 02:32:12 (GMT)
commit79f3ef63361b00e2e70a9d8edba6afa5096d3380 (patch)
treebb052ffba41cf895bb56b12a24b9c3f0730b96cb /Lib/test/test_json
parente084e97f9f502908534bc87596c5bb7b6ff9a684 (diff)
parent584f5cbf16980f21c58bf7ce7e451e022355fa3d (diff)
downloadcpython-79f3ef63361b00e2e70a9d8edba6afa5096d3380.zip
cpython-79f3ef63361b00e2e70a9d8edba6afa5096d3380.tar.gz
cpython-79f3ef63361b00e2e70a9d8edba6afa5096d3380.tar.bz2
merge 3.4
Diffstat (limited to 'Lib/test/test_json')
-rw-r--r--Lib/test/test_json/test_decode.py4
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