/third_party/python/Lib/test/test_json/ |
D | test_enum.py | 38 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 …]
|
D | test_dump.py | 13 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)
|
D | test_unicode.py | 12 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)
|
D | test_recursion.py | 13 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)
|
D | test_float.py | 8 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)
|
D | test_indent.py | 32 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)
|
D | test_separators.py | 32 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__.py | 20 dumps = staticmethod(pyjson.dumps) variable in PyTest 28 dumps = staticmethod(cjson.dumps) variable in CTest
|
D | test_default.py | 7 self.dumps(type, default=repr), 8 self.dumps(repr(type)))
|
D | test_encode_basestring_ascii.py | 32 s = self.dumps(OrderedDict(items)) 37 s = self.dumps(dict(items), sort_keys=True)
|
/third_party/python/Lib/ctypes/test/ |
D | test_pickling.py | 18 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/ |
D | test_plistlib.py | 461 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 …]
|
D | pickletester.py | 1460 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 …]
|
D | test_marshal.py | 18 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 …]
|
D | test_list.py | 87 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)
|
D | test_xmlrpc.py | 49 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 …]
|
D | test_bool.py | 266 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.')
|
D | test_pickletools.py | 10 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)
|
D | test_pickle.py | 37 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/ |
D | bq_upload_result.py | 100 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/ |
D | test_parallel_compilation.py | 29 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/ |
D | serialize.cpp | 21 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/ |
D | 0001load-dumps_0 | 49 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
|
D | 0002load-fedora27-firewalld_0 | 56 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/ |
D | tbe_adapter.py | 391 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))
|