Home
last modified time | relevance | path

Searched refs:dumps (Results 1 – 25 of 72) sorted by relevance

123

/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Lib/json/tests/
Dtest_float.py9 self.assertEqual(float(self.dumps(num)), num)
10 self.assertEqual(self.loads(self.dumps(num)), num)
11 self.assertEqual(self.loads(unicode(self.dumps(num))), num)
15 self.assertEqual(self.dumps(num), str(num))
16 self.assertEqual(int(self.dumps(num)), num)
17 self.assertEqual(self.loads(self.dumps(num)), num)
18 self.assertEqual(self.loads(unicode(self.dumps(num))), num)
26 out = self.dumps([val])
33 self.assertRaises(ValueError, self.dumps, [val], allow_nan=False)
Dtest_check_circular.py11 self.assertRaises(ValueError, self.dumps, dct)
16 self.assertRaises(ValueError, self.dumps, lst)
22 self.assertRaises(ValueError, self.dumps, dct2)
25 self.dumps([set()], default=default_iterable)
26 self.assertRaises(TypeError, self.dumps, [set()])
29 self.dumps([set()], default=default_iterable, check_circular=False)
30 self.assertRaises(TypeError, self.dumps, [set()], check_circular=False)
Dtest_recursion.py13 self.dumps(x)
22 self.dumps(x)
30 self.dumps(x)
36 self.dumps(x)
44 self.dumps(x)
92 self.dumps(l)
94 self.dumps(d)
Dtest_unicode.py17 ju = self.dumps(u, encoding='utf-8')
18 js = self.dumps(s, encoding='utf-8')
23 j = self.dumps(u)
28 j = self.dumps([u])
33 j = self.dumps(u, ensure_ascii=False)
38 j = self.dumps([u], ensure_ascii=False)
43 self.assertEqual(self.dumps(u), '"\\ud834\\udd20"')
44 self.assertEqual(self.dumps(u, ensure_ascii=False), u'"\U0001d120"')
Dtest_dump.py12 self.assertEqual(self.dumps({}), '{}')
15 self.assertEqual(self.dumps(
18 self.assertEqual(self.dumps(
27 self.assertEqual(self.dumps(a, default=crasher),
Dtest_indent.py33 d1 = self.dumps(h)
34 d2 = self.dumps(h, indent=2, sort_keys=True, separators=(',', ': '))
46 d1 = self.dumps(h, indent=indent)
D__init__.py17 dumps = staticmethod(pyjson.dumps) variable in PyTest
24 dumps = staticmethod(cjson.dumps) variable in CTest
Dtest_default.py7 self.dumps(type, default=repr),
8 self.dumps(repr(type)))
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/
Dtest_float.py9 self.assertEqual(float(self.dumps(num)), num)
10 self.assertEqual(self.loads(self.dumps(num)), num)
11 self.assertEqual(self.loads(unicode(self.dumps(num))), num)
15 self.assertEqual(self.dumps(num), str(num))
16 self.assertEqual(int(self.dumps(num)), num)
17 self.assertEqual(self.loads(self.dumps(num)), num)
18 self.assertEqual(self.loads(unicode(self.dumps(num))), num)
Dtest_check_circular.py11 self.assertRaises(ValueError, self.dumps, dct)
16 self.assertRaises(ValueError, self.dumps, lst)
22 self.assertRaises(ValueError, self.dumps, dct2)
25 self.dumps([set()], default=default_iterable)
26 self.assertRaises(TypeError, self.dumps, [set()])
29 self.dumps([set()], default=default_iterable, check_circular=False)
30 self.assertRaises(TypeError, self.dumps, [set()], check_circular=False)
Dtest_recursion.py13 self.dumps(x)
22 self.dumps(x)
30 self.dumps(x)
36 self.dumps(x)
44 self.dumps(x)
92 self.dumps(l)
94 self.dumps(d)
Dtest_unicode.py17 ju = self.dumps(u, encoding='utf-8')
18 js = self.dumps(s, encoding='utf-8')
23 j = self.dumps(u)
28 j = self.dumps([u])
33 j = self.dumps(u, ensure_ascii=False)
38 j = self.dumps([u], ensure_ascii=False)
43 self.assertEqual(self.dumps(u), '"\\ud834\\udd20"')
44 self.assertEqual(self.dumps(u, ensure_ascii=False), u'"\U0001d120"')
Dtest_dump.py12 self.assertEqual(self.dumps({}), '{}')
15 self.assertEqual(self.dumps(
18 self.assertEqual(self.dumps(
Dtest_indent.py33 d1 = self.dumps(h)
34 d2 = self.dumps(h, indent=2, sort_keys=True, separators=(',', ': '))
46 d1 = self.dumps(h, indent=indent)
D__init__.py17 dumps = staticmethod(pyjson.dumps) variable in PyTest
24 dumps = staticmethod(cjson.dumps) variable in CTest
Dtest_default.py7 self.dumps(type, default=repr),
8 self.dumps(repr(type)))
Dtest_pass1.py68 out = self.dumps(res)
71 self.dumps(res, allow_nan=False)
Dtest_separators.py32 d1 = self.dumps(h)
33 d2 = self.dumps(h, indent=2, sort_keys=True, separators=(' ,', ' : '))
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/test/
Dtest_marshal.py16 s = marshal.dumps(expected)
51 new = marshal.loads(marshal.dumps(b))
67 s = marshal.dumps(f)
76 s = marshal.dumps(f, 2)
80 s = marshal.dumps(f, 1)
89 s = marshal.dumps(f)
93 s = marshal.dumps(f, 1)
110 new = marshal.loads(marshal.dumps(s))
121 new = marshal.loads(marshal.dumps(s))
135 new = marshal.loads(marshal.dumps(b))
[all …]
Dpickletester.py413 s = self.dumps(x, proto)
418 s = self.dumps(x, proto)
423 s = self.dumps(x, proto)
432 s = self.dumps(expected, proto)
452 s = self.dumps(self._testdata, proto)
462 s = self.dumps(l, proto)
471 s = self.dumps(t, proto)
481 s = self.dumps(d, proto)
490 s = self.dumps(i, 2)
502 s = self.dumps(l, proto)
[all …]
Dtest_cpickle.py10 self.dumps = cPickle.dumps
18 def dumps(self, arg, proto=0): member in cPicklePicklerTests
34 def dumps(self, arg, proto=0): member in cPickleListPicklerTests
48 def dumps(self, arg, proto=0): member in cPickleFastPicklerTests
96 b = self.loads(self.dumps(a))
117 self.assertRaises((AttributeError, RuntimeError), cPickle.dumps, n)
125 cPickle.dumps(res)
Dtest_xpickle.py39 def dumps(self, arg, proto=0, fast=False): member in DumpCPickle_LoadPickle
41 return cPickle.dumps(arg, proto)
51 def dumps(self, arg, proto=0, fast=False): member in DumpPickle_LoadCPickle
53 return pickle.dumps(arg, proto)
104 data = self.module.dumps((proto, obj), proto)
114 def dumps(self, arg, proto=0, fast=False): member in AbstractCompatTests
143 pickle = self.dumps(value, 0)
149 pickle = self.dumps(value, proto)
164 p = self.dumps(u, proto)
Dtest_bool.py304 self.assertIs(marshal.loads(marshal.dumps(True)), True)
305 self.assertIs(marshal.loads(marshal.dumps(False)), False)
309 self.assertIs(pickle.loads(pickle.dumps(True)), True)
310 self.assertIs(pickle.loads(pickle.dumps(False)), False)
311 self.assertIs(pickle.loads(pickle.dumps(True, True)), True)
312 self.assertIs(pickle.loads(pickle.dumps(False, True)), False)
316 self.assertIs(cPickle.loads(cPickle.dumps(True)), True)
317 self.assertIs(cPickle.loads(cPickle.dumps(False)), False)
318 self.assertIs(cPickle.loads(cPickle.dumps(True, True)), True)
319 self.assertIs(cPickle.loads(cPickle.dumps(False, True)), False)
[all …]
Dtest_pickle.py13 def dumps(self, arg, proto=0, fast=0): member in PickleTests
15 return pickle.dumps(arg, proto)
28 def dumps(self, arg, proto=0, fast=0): member in PicklerTests
44 def dumps(self, arg, proto=0, fast=0): member in PersPicklerTests
Dtest_pickletools.py9 def dumps(self, arg, proto=0, fast=0): member in OptimizedPickleTests
10 return pickletools.optimize(pickle.dumps(arg, proto))

123