mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
merge r66932 and add a few py3k only checks
This commit is contained in:
parent
60192084c4
commit
a13d475901
3 changed files with 19 additions and 6 deletions
|
@ -2,6 +2,7 @@ import sys
|
|||
import decimal
|
||||
from unittest import TestCase
|
||||
|
||||
import json
|
||||
import json.decoder
|
||||
|
||||
class TestScanString(TestCase):
|
||||
|
@ -101,3 +102,9 @@ class TestScanString(TestCase):
|
|||
self.assertEquals(
|
||||
scanstring('["Bad value", truth]', 2, None, True),
|
||||
('Bad value', 12))
|
||||
|
||||
def test_issue3623(self):
|
||||
self.assertRaises(ValueError, json.decoder.scanstring, b"xxx", 1,
|
||||
"xxx")
|
||||
self.assertRaises(UnicodeDecodeError,
|
||||
json.encoder.encode_basestring_ascii, b"xx\xff")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue