diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-04 11:40:53 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-04 11:40:53 (GMT) |
commit | df8a8f768d929b56e43c42299064e7bcaebee4c7 (patch) | |
tree | b3295fda05fda171dcdeec204249a88922b79809 /Lib/json | |
parent | 1602ec109b8f4a9b2e015359e3674d6e5bb8f07c (diff) | |
download | cpython-df8a8f768d929b56e43c42299064e7bcaebee4c7.zip cpython-df8a8f768d929b56e43c42299064e7bcaebee4c7.tar.gz cpython-df8a8f768d929b56e43c42299064e7bcaebee4c7.tar.bz2 |
#11982: fix json.loads('""') to return u'' rather than ''.
Diffstat (limited to 'Lib/json')
-rw-r--r-- | Lib/json/tests/test_decode.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/json/tests/test_decode.py b/Lib/json/tests/test_decode.py index 95088b4..0821595 100644 --- a/Lib/json/tests/test_decode.py +++ b/Lib/json/tests/test_decode.py @@ -26,7 +26,8 @@ class TestDecode(TestCase): def test_empty_objects(self): self.assertEqual(json.loads('{}'), {}) self.assertEqual(json.loads('[]'), []) - self.assertEqual(json.loads('""'), "") + self.assertEqual(json.loads('""'), u"") + self.assertIsInstance(json.loads('""'), unicode) def test_object_pairs_hook(self): s = '{"xkd":1, "kcw":2, "art":3, "hxm":4, "qrt":5, "pad":6, "hoy":7}' |