Home
last modified time | relevance | path

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

12345678910>>...15

/third_party/python/Lib/test/test_json/
Dtest_enum.py38 self.assertEqual(self.dumps(enum), repr(enum.value))
39 self.assertEqual(float(self.dumps(enum)), enum)
40 self.assertEqual(self.loads(self.dumps(enum)), enum)
44 self.assertEqual(self.dumps(enum), expected)
46 self.assertEqual(float(self.dumps(enum)), enum)
47 self.assertEqual(self.loads(self.dumps(enum)), enum)
49 self.assertTrue(isnan(float(self.dumps(enum))))
50 self.assertTrue(isnan(self.loads(self.dumps(enum))))
54 self.assertEqual(self.dumps(enum), str(enum.value))
55 self.assertEqual(int(self.dumps(enum)), enum)
[all …]
Dtest_dump.py13 self.assertEqual(self.dumps({}), '{}')
18 self.json.dumps(v)
20 s = self.json.dumps(v, skipkeys=True)
26 self.assertEqual(self.dumps(
29 self.assertEqual(self.dumps(
38 self.assertEqual(self.dumps(a, default=crasher),
58 self.assertEqual(self.dumps(d, sort_keys=True), '{"1337": "true.dat"}')
74 encoded = self.dumps(l)
Dtest_unicode.py12 j = self.dumps(u)
17 j = self.dumps([u])
22 j = self.dumps(u, ensure_ascii=False)
27 j = self.dumps([u], ensure_ascii=False)
32 self.assertEqual(self.dumps(u), '"\\ud834\\udd20"')
33 self.assertEqual(self.dumps(u, ensure_ascii=False), '"\U0001d120"')
52 self.assertRaises(TypeError, self.dumps, b"hi")
53 self.assertRaises(TypeError, self.dumps, [b"hi"])
64 encoded = self.dumps(data).encode(encoding)
Dtest_recursion.py13 self.dumps(x)
22 self.dumps(x)
30 self.dumps(x)
36 self.dumps(x)
44 self.dumps(x)
84 self.dumps(l)
86 self.dumps(d)
Dtest_float.py8 self.assertEqual(float(self.dumps(num)), num)
9 self.assertEqual(self.loads(self.dumps(num)), num)
13 self.assertEqual(self.dumps(num), str(num))
14 self.assertEqual(int(self.dumps(num)), num)
22 out = self.dumps([val])
29 self.assertRaises(ValueError, self.dumps, [val], allow_nan=False)
Dtest_indent.py32 d1 = self.dumps(h)
33 d2 = self.dumps(h, indent=2, sort_keys=True, separators=(',', ': '))
34 d3 = self.dumps(h, indent='\t', sort_keys=True, separators=(',', ': '))
35 d4 = self.dumps(h, indent=2, sort_keys=True)
36 d5 = self.dumps(h, indent='\t', sort_keys=True)
53 d1 = self.dumps(h, indent=indent)
Dtest_separators.py32 d1 = self.dumps(h)
33 d2 = self.dumps(h, indent=2, sort_keys=True, separators=(' ,', ' : '))
44 self.assertRaises(TypeError, self.dumps, h, separators=(b', ', ': '))
45 self.assertRaises(TypeError, self.dumps, h, separators=(', ', b': '))
46 self.assertRaises(TypeError, self.dumps, h, separators=(b', ', b': '))
D__init__.py20 dumps = staticmethod(pyjson.dumps) variable in PyTest
28 dumps = staticmethod(cjson.dumps) variable in CTest
Dtest_default.py7 self.dumps(type, default=repr),
8 self.dumps(repr(type)))
Dtest_encode_basestring_ascii.py32 s = self.dumps(OrderedDict(items))
37 s = self.dumps(dict(items), sort_keys=True)
/third_party/python/Lib/ctypes/test/
Dtest_pickling.py18 def dumps(self, item): member in PickleTest
19 return pickle.dumps(item, self.proto)
29 dst = self.loads(self.dumps(src))
41 y = self.loads(self.dumps(x))
55 self.assertRaises(ValueError, lambda: self.dumps(Y()))
67 self.assertRaises(ValueError, lambda: self.dumps(item))
70 self.dumps(c_char(b"x"))
72 self.dumps(c_wchar("x"))
/third_party/python/Lib/test/
Dtest_plistlib.py461 self.assertRaises(TypeError, plistlib.dumps, pl, fmt=fmt)
476 data = plistlib.dumps(pl, fmt=fmt)
480 data2 = plistlib.dumps(pl2, fmt=fmt)
486 self.assertRaises(OverflowError, plistlib.dumps,
493 data = plistlib.dumps(bytearray(pl), fmt=fmt)
497 data2 = plistlib.dumps(pl2, fmt=fmt)
502 data = plistlib.dumps(pl)
505 data2 = plistlib.dumps(pl2)
510 self.assertEqual(plistlib.loads(plistlib.dumps(data)), data)
514 self.assertEqual(plistlib.loads(plistlib.dumps(data)), data)
[all …]
Dpickletester.py1460 s = self.dumps(x, proto)
1465 s = self.dumps(x, proto)
1470 s = self.dumps(x, proto)
1479 s = self.dumps(expected, proto)
1494 s = self.dumps(self._testdata, proto)
1505 s = self.dumps(l, proto)
1526 s = self.dumps(t, proto)
1538 s = self.dumps(t, proto)
1561 s = self.dumps(d, proto)
1582 s = self.dumps(t, proto)
[all …]
Dtest_marshal.py18 new = marshal.loads(marshal.dumps(sample, *extra))
76 s = marshal.dumps(f, 2)
80 s = marshal.dumps(f, 1)
95 self.helper(marshal.loads(marshal.dumps(s)))
107 new = marshal.loads(marshal.dumps(StopIteration))
113 new = marshal.loads(marshal.dumps(co))
120 marshal.loads(marshal.dumps(codes))
125 co1, co2 = marshal.loads(marshal.dumps((co1, co2)))
133 co = marshal.loads(marshal.dumps(co))
168 new = marshal.loads(marshal.dumps(b))
[all …]
Dtest_list.py87 d = pickle.dumps((itorig, orig), proto)
95 d = pickle.dumps((itorig, orig), proto)
104 d = pickle.dumps((itorig, orig), proto)
112 d = pickle.dumps((itorig, orig), proto)
123 d = pickle.dumps((itorig, orig), proto)
131 d = pickle.dumps((itorig, orig), proto)
140 d = pickle.dumps((itorig, orig), proto)
148 d = pickle.dumps((itorig, orig), proto)
Dtest_xmlrpc.py49 dump = xmlrpclib.dumps((alist,))
60 s = xmlrpclib.dumps((dt,))
91 s = xmlrpclib.dumps((dt,))
107 ((new_d,), dummy) = xmlrpclib.loads(xmlrpclib.dumps((d,),
112 s = xmlrpclib.dumps((new_d,), methodresponse=True)
121 ((t2,), dummy) = xmlrpclib.loads(xmlrpclib.dumps((t,)))
125 self.assertRaises(OverflowError, xmlrpclib.dumps, (2**99,))
128 self.assertRaises(TypeError, xmlrpclib.dumps, ({(1,2,3): 1},))
134 self.assertRaises(TypeError, xmlrpclib.dumps, (l,))
140 self.assertRaises(TypeError, xmlrpclib.dumps, (d,))
[all …]
Dtest_bool.py266 self.assertIs(marshal.loads(marshal.dumps(True)), True)
267 self.assertIs(marshal.loads(marshal.dumps(False)), False)
272 self.assertIs(pickle.loads(pickle.dumps(True, proto)), True)
273 self.assertIs(pickle.loads(pickle.dumps(False, proto)), False)
278 self.assertEqual(pickle.dumps(True, protocol=0), b"I01\n.")
279 self.assertEqual(pickle.dumps(False, protocol=0), b"I00\n.")
280 self.assertEqual(pickle.dumps(True, protocol=1), b"I01\n.")
281 self.assertEqual(pickle.dumps(False, protocol=1), b"I00\n.")
282 self.assertEqual(pickle.dumps(True, protocol=2), b'\x80\x02\x88.')
283 self.assertEqual(pickle.dumps(False, protocol=2), b'\x80\x02\x89.')
Dtest_pickletools.py10 def dumps(self, arg, proto=None, **kwargs): member in OptimizedPickleTests
11 return pickletools.optimize(pickle.dumps(arg, proto, **kwargs))
26 pickled = pickle.dumps(data, proto)
Dtest_pickle.py37 dumps = staticmethod(pickle._dumps) variable in PyPickleTests
63 def dumps(self, arg, proto=None, **kwargs): member in PyPicklerTests
84 def dumps(self, arg, protocol=None, **kwargs): member in InMemoryPickleTests
85 return pickle.dumps(arg, protocol, **kwargs)
95 def dumps(self, arg, proto=None): member in PersistentPicklerUnpicklerMixin
161 unpickler = Unpickler(io.BytesIO(self.dumps('abc', proto)))
218 from _pickle import dump, dumps, load, loads, Pickler, Unpickler
311 dump = pickle.dumps(data)
333 u = unpickler(io.BytesIO(pickle.dumps('a', 0)),
/third_party/grpc/tools/run_tests/performance/
Dbq_upload_result.py100 scenario_result['scenario']['clientConfig'] = json.dumps(
102 scenario_result['scenario']['serverConfig'] = json.dumps(
104 scenario_result['latencies'] = json.dumps(scenario_result['latencies'])
113 stats['latencies'] = json.dumps(stats['latencies'])
115 scenario_result['serverCores'] = json.dumps(scenario_result['serverCores'])
116 scenario_result['clientSuccess'] = json.dumps(
118 scenario_result['serverSuccess'] = json.dumps(
120 scenario_result['requestResults'] = json.dumps(
/third_party/mindspore/tests/st/ops/ascend/test_tbe_ops/
Dtest_parallel_compilation.py29 res = tbe_compiler.job_handler(json.dumps(init_job_json))
47 print("Final Compile Result:{}".format(json.dumps(compile_result_json["result"])))
70 res = tbe_compiler.job_handler(json.dumps(query_job_json))
89 … print("\n $$$Final Compile Result:{}\n".format(json.dumps(target_job["result"])))
116 res = tbe_compiler.job_handler(json.dumps(finalize_job_json))
129 test_parallel_compilation(json.dumps(op_json))
/third_party/boost/libs/mpi/src/python/
Dserialize.cpp21 object dumps; member
29 object pickle::dumps(object obj, int protocol) in dumps() function in boost::python::pickle
32 return (data->dumps)(obj, protocol); in dumps()
45 data->dumps = data->module.attr("dumps"); in initialize_data()
/third_party/iptables/iptables/tests/shell/testcases/ipt-save/
D0001load-dumps_049 do_simple "iptables" $(dirname "$0")/dumps/ipt-save-filter.txt
50 do_simple "iptables" $(dirname "$0")/dumps/policy-drop.txt
51 do_simple "iptables" $(dirname "$0")/dumps/wireless.txt
D0002load-fedora27-firewalld_056 do_simple "iptables" $(dirname "$0")/dumps/fedora27-iptables "-c"
57 do_simple "ip6tables" $(dirname "$0")/dumps/fedora27-ip6tables
/third_party/mindspore/mindspore/_extends/parallel_compile/tbe_compiler/
Dtbe_adapter.py391 dump_fusion_json(json.dumps(job.content), job.sys_para_debug_path)
424 … json.dumps(fuzz_build_info), job.rl_tune_switch, job.rl_tune_list, job.pass_list,
440 dump_fusion_json(json.dumps(job.content), job.sys_tune_dump_path)
473 …dispatch_fusion_op_compile_task(job.source_id, job.id, l1_size, json.dumps(job.content), op_kernel…
487 …dispatch_autotune_task(job.source_id, job.id, l1_size, json.dumps(job.content), {}, op_kernel_name)
524 op_pattern, auto_tiling_mode, device_id, json.dumps(fuzz_build_info))
556 compile_op_by_mp(json.dumps(job.content))
579 json.dumps(job.content))

12345678910>>...15