Lines Matching refs:loads
48 self.assertEqual(self.loads('"' + u + '"'), u)
49 self.assertEqual(self.loads('"z\\ud834\\udd20x"'), u)
55 self.assertEqual(self.loads(s), u)
61 self.assertEqual(self.loads(s), eval(s))
62 self.assertEqual(self.loads(s, object_pairs_hook = lambda x: x), p)
63 od = self.loads(s, object_pairs_hook = OrderedDict)
67 self.assertEqual(self.loads(s,
73 self.assertEqual(self.loads(u'{"a": "\xe9"}'.encode('utf-8')),
77 self.assertEqual(type(self.loads(u'""')), unicode)
78 self.assertEqual(type(self.loads(u'"a"')), unicode)
79 self.assertEqual(type(self.loads(u'["a"]')[0]), unicode)
81 self.assertEqual(type(self.loads('"foo"')), unicode)
84 self.assertRaises(UnicodeEncodeError, self.loads, '"a"', u"rat\xe9")
85 self.assertRaises(TypeError, self.loads, '"a"', 1)