summaryrefslogtreecommitdiffstats
path: root/Lib/json
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2010-11-02 21:03:09 (GMT)
committerBarry Warsaw <barry@python.org>2010-11-02 21:03:09 (GMT)
commitfa6582752a19f38f8c666d36122c7fc450c2dcf5 (patch)
treef73e936743e00deddcff54c112dbcc3415599b89 /Lib/json
parent921387ba0e5b41d563c7757858900187bd36609d (diff)
downloadcpython-fa6582752a19f38f8c666d36122c7fc450c2dcf5.zip
cpython-fa6582752a19f38f8c666d36122c7fc450c2dcf5.tar.gz
cpython-fa6582752a19f38f8c666d36122c7fc450c2dcf5.tar.bz2
Issue 10038. Restore the Python 2.6 behavior that json.loads() always returns
unicode. Patch by Patch by Walter Dörwald.
Diffstat (limited to 'Lib/json')
-rw-r--r--Lib/json/tests/test_unicode.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/json/tests/test_unicode.py b/Lib/json/tests/test_unicode.py
index 13759f8..6aaed3f 100644
--- a/Lib/json/tests/test_unicode.py
+++ b/Lib/json/tests/test_unicode.py
@@ -78,3 +78,5 @@ class TestUnicode(TestCase):
self.assertEquals(type(json.loads(u'""')), unicode)
self.assertEquals(type(json.loads(u'"a"')), unicode)
self.assertEquals(type(json.loads(u'["a"]')[0]), unicode)
+ # Issue 10038.
+ self.assertEquals(type(json.loads('"foo"')), unicode)