summaryrefslogtreecommitdiffstats
path: root/Lib/json
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/json')
-rw-r--r--Lib/json/tests/test_scanstring.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/json/tests/test_scanstring.py b/Lib/json/tests/test_scanstring.py
index 2d55672..2e9136b 100644
--- a/Lib/json/tests/test_scanstring.py
+++ b/Lib/json/tests/test_scanstring.py
@@ -102,3 +102,6 @@ class TestScanString(TestCase):
self.assertEquals(
scanstring('["Bad value", truth]', 2, True),
('Bad value', 12))
+
+ def test_overflow(self):
+ self.assertRaises(OverflowError, json.decoder.scanstring, b"xxx", sys.maxsize+1)