summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_json/test_decode.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-04-14 02:28:16 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-04-14 02:28:16 (GMT)
commit156285c35f8ff856883f09394653b000331e3e33 (patch)
tree76fe7455051296fdbb57ced15fb20ec7d321c4ce /Lib/test/test_json/test_decode.py
parentf5c34054f9ea1fbdaeafdcf1a6f17f64f4dfed63 (diff)
parent99b5afab74428e5ddfd877bdf3aa8a8c479696b1 (diff)
downloadcpython-156285c35f8ff856883f09394653b000331e3e33.zip
cpython-156285c35f8ff856883f09394653b000331e3e33.tar.gz
cpython-156285c35f8ff856883f09394653b000331e3e33.tar.bz2
merge 3.2
Diffstat (limited to 'Lib/test/test_json/test_decode.py')
-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 d23e285..17245eb 100644
--- a/Lib/test/test_json/test_decode.py
+++ b/Lib/test/test_json/test_decode.py
@@ -70,5 +70,9 @@ class TestDecode:
msg = 'escape'
self.assertRaisesRegex(ValueError, msg, self.loads, s)
+ 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