summaryrefslogtreecommitdiff
path: root/simplejson/tests/test_decode.py
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2010-11-01 09:31:11 +0000
committerBob Ippolito <bob@redivi.com>2010-11-01 09:31:11 +0000
commit81804e672f22c236dda9412221674b762bb13ec4 (patch)
treee2996fa317ec5671fe39f64681e7317558a34d0f /simplejson/tests/test_decode.py
parentff9cb965faa144b3f221fad0e7f6f09cc91ac30d (diff)
downloadsimplejson-81804e672f22c236dda9412221674b762bb13ec4.tar.gz
re http://code.google.com/p/simplejson/issues/detail?id=85
git-svn-id: http://simplejson.googlecode.com/svn/trunk@236 a4795897-2c25-0410-b006-0d3caba88fa1
Diffstat (limited to 'simplejson/tests/test_decode.py')
-rw-r--r--simplejson/tests/test_decode.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/simplejson/tests/test_decode.py b/simplejson/tests/test_decode.py
index a5a1c48..a140a13 100644
--- a/simplejson/tests/test_decode.py
+++ b/simplejson/tests/test_decode.py
@@ -71,3 +71,13 @@ class TestDecode(TestCase):
self.assertEqual(json.loads(u'""'), u"")
self.assertEqual(json.loads('[""]'), [""])
self.assertEqual(json.loads(u'[""]'), [u""])
+
+ def test_raw_decode(self):
+ cls = json.decoder.JSONDecoder
+ self.assertEqual(
+ ({'a': {}}, 9),
+ cls().raw_decode("{\"a\": {}}"))
+ # http://code.google.com/p/simplejson/issues/detail?id=85
+ self.assertEqual(
+ ({'a': {}}, 9),
+ cls(object_pairs_hook=dict).raw_decode("{\"a\": {}}"))