Home
last modified time | relevance | path

Searched refs:OrderedDict (Results 1 – 25 of 309) sorted by relevance

12345678910>>...13

/external/python/cpython3/Lib/test/
Dtest_ordered_dict.py35 OrderedDict = self.OrderedDict
37 OrderedDict([('a', 1), ('b', 2)], None) # too many args
39 self.assertEqual(sorted(OrderedDict(dict(pairs)).items()), pairs) # dict input
40 self.assertEqual(sorted(OrderedDict(**dict(pairs)).items()), pairs) # kwds input
41 self.assertEqual(list(OrderedDict(pairs).items()), pairs) # pairs input
42 self.assertEqual(list(OrderedDict([('a', 1), ('b', 2), ('c', 9), ('d', 4)],
46 self.assertEqual(list(OrderedDict(self=42).items()), [('self', 42)])
47 self.assertEqual(list(OrderedDict(other=42).items()), [('other', 42)])
48 self.assertRaises(TypeError, OrderedDict, 42)
49 self.assertRaises(TypeError, OrderedDict, (), ())
[all …]
/external/python/cpython2/Lib/test/
Dtest_ordered_dict.py5 from collections import OrderedDict
14 OrderedDict([('a', 1), ('b', 2)], None) # too many args
16 self.assertEqual(sorted(OrderedDict(dict(pairs)).items()), pairs) # dict input
17 self.assertEqual(sorted(OrderedDict(**dict(pairs)).items()), pairs) # kwds input
18 self.assertEqual(list(OrderedDict(pairs).items()), pairs) # pairs input
19 self.assertEqual(list(OrderedDict([('a', 1), ('b', 2), ('c', 9), ('d', 4)],
23 self.assertEqual(list(OrderedDict(self=42).items()), [('self', 42)])
24 self.assertEqual(list(OrderedDict(other=42).items()), [('other', 42)])
25 self.assertRaises(TypeError, OrderedDict, 42)
26 self.assertRaises(TypeError, OrderedDict, (), ())
[all …]
/external/python/asn1crypto/tests/
Dtest_x509.py501 …self.assertEqual(alt_names[4].chosen.native, util.OrderedDict([('type_id', '1.2.3.4'), ('value', '…
503 … self.assertEqual(alt_names[5].chosen.native, util.OrderedDict([('common_name', '127.0.0.3')]))
700 util.OrderedDict([('type', 'pda_country_of_citizenship'), ('values', ['DE'])]),
701 util.OrderedDict([('type', 'pda_gender'), ('values', ['F'])]),
702 util.OrderedDict([('type', 'pda_date_of_birth'), ('values', [
704 util.OrderedDict([('type', 'pda_place_of_birth'), ('values', ['Darmstadt'])]),
891 util.OrderedDict([
1064 util.OrderedDict([
1068 util.OrderedDict([
1073 util.OrderedDict([
[all …]
Dtest_cms.py261 util.OrderedDict([
264 util.OrderedDict([
359 util.OrderedDict([
397 util.OrderedDict([
400 util.OrderedDict([
418 util.OrderedDict([
458 util.OrderedDict([
497 util.OrderedDict([
535 util.OrderedDict([
538 util.OrderedDict([
[all …]
Dtest_csr.py39 util.OrderedDict([
51 util.OrderedDict([
82 util.OrderedDict([
94 util.OrderedDict([
110 util.OrderedDict([
116 util.OrderedDict([
121 util.OrderedDict([
127 util.OrderedDict([
Dtest_tsp.py142 util.OrderedDict([
170 util.OrderedDict([
173 util.OrderedDict([
226 util.OrderedDict([
230 util.OrderedDict([
/external/tensorflow/tensorflow/python/framework/
Dtest_combinations_test.py17 from collections import OrderedDict
44 OrderedDict([("aa", 1), ("ab", 2)]),
45 OrderedDict([("aa", 1), ("ab", 3)]),
46 OrderedDict([("aa", 2), ("ab", 2)]),
47 OrderedDict([("aa", 2), ("ab", 3)])
78 OrderedDict([("distribution", "d1"), ("loss", "callable"),
80 OrderedDict([("distribution", "d1"), ("loss", "tensor"),
82 OrderedDict([("distribution", "d1"), ("loss", "callable"),
84 OrderedDict([("distribution", "d2"), ("loss", "callable"),
86 OrderedDict([("distribution", "d2"), ("loss", "tensor"),
[all …]
Dtest_combinations.py46 from collections import OrderedDict
255 assert isinstance(combination, OrderedDict)
262 OrderedDict(
382 return [OrderedDict()]
385 kwargs = OrderedDict(sorted(kwargs.items(), key=sort_by_key))
397 OrderedDict(sorted(list(combined.items()) + [(key, v)], key=sort_by_key))
433 combined_results.append(OrderedDict(list(a.items()) + list(b.items())))
/external/angle/build/android/gyp/
Djava_cpp_enum_tests.py85 self.assertEqual(collections.OrderedDict([('VALUE_ZERO', 0),
109 self.assertEqual(collections.OrderedDict([('VALUE_ZERO', '1 << 0'),
114 expected_entries = collections.OrderedDict([
130 expected_entries = collections.OrderedDict([
152 expected_entries = collections.OrderedDict([
175 expected_entries = collections.OrderedDict([
178 expected_comments = collections.OrderedDict([
210 self.assertEqual(collections.OrderedDict([('A', 0),
241 self.assertEqual(collections.OrderedDict([('A', '1'),
244 self.assertEqual(collections.OrderedDict([('B', 'Comment there')]),
[all …]
/external/cronet/build/android/gyp/
Djava_cpp_enum_tests.py85 self.assertEqual(collections.OrderedDict([('VALUE_ZERO', 0),
109 self.assertEqual(collections.OrderedDict([('VALUE_ZERO', '1 << 0'),
114 expected_entries = collections.OrderedDict([
130 expected_entries = collections.OrderedDict([
152 expected_entries = collections.OrderedDict([
175 expected_entries = collections.OrderedDict([
178 expected_comments = collections.OrderedDict([
210 self.assertEqual(collections.OrderedDict([('A', 0),
241 self.assertEqual(collections.OrderedDict([('A', '1'),
244 self.assertEqual(collections.OrderedDict([('B', 'Comment there')]),
[all …]
/external/pigweed/pw_ide/py/pw_ide/
Dvscode.py68 from typing import Any, Dict, List, OrderedDict
92 def _activated_env() -> OrderedDict[str, Any]:
110 return OrderedDict(env)
141 _DEFAULT_SETTINGS: EditorSettingsDict = OrderedDict(
146 "files.associations": OrderedDict({"*.inc": "cpp"}),
147 "files.exclude": OrderedDict(
177 "[cpp]": OrderedDict(
181 "[python]": OrderedDict({"editor.tabSize": 4}),
183 "[gn]": OrderedDict({"editor.defaultFormatter": "msedge-dev.gnls"}),
184 "[proto3]": OrderedDict(
[all …]
Deditors.py59 OrderedDict,
75 def load(self, *args, **kwargs) -> OrderedDict:
80 def dump(self, data: OrderedDict, *args, **kwargs) -> None: argument
91 def load(self, *args, **kwargs) -> OrderedDict:
93 kwargs['object_pairs_hook'] = OrderedDict
96 def dump(self, data: OrderedDict, *args, **kwargs) -> None: argument
112 def load(self, *args, **kwargs) -> OrderedDict:
114 kwargs['object_pairs_hook'] = OrderedDict
117 def dump(self, data: OrderedDict, *args, **kwargs) -> None: argument
200 EditorSettingsDict = OrderedDict[str, Any]
[all …]
/external/python/cpython2/Lib/json/tests/
Dtest_decode.py3 from collections import OrderedDict
39 od = self.loads(s, object_pairs_hook=OrderedDict)
40 self.assertEqual(od, OrderedDict(p))
41 self.assertEqual(type(od), OrderedDict)
43 self.assertEqual(self.loads(s, object_pairs_hook=OrderedDict,
45 OrderedDict(p))
47 self.assertEqual(self.loads('{}', object_pairs_hook=OrderedDict),
48 OrderedDict())
50 object_pairs_hook=OrderedDict),
51 OrderedDict([('empty', OrderedDict())]))
Dtest_unicode.py1 from collections import OrderedDict
63 od = self.loads(s, object_pairs_hook = OrderedDict)
64 self.assertEqual(od, OrderedDict(p))
65 self.assertEqual(type(od), OrderedDict)
68 object_pairs_hook = OrderedDict,
70 OrderedDict(p))
/external/pigweed/pw_ide/py/
Deditors_test.py16 from collections import OrderedDict
65 dict_deep_merge(dict_b, dict_a, lambda: OrderedDict())
69 dict_a = OrderedDict({'hello': 'world'})
70 dict_b = OrderedDict({'foo': 'bar'})
72 expected = OrderedDict(
79 result = dict_deep_merge(dict_b, dict_a, lambda: OrderedDict())
84 dict_a = OrderedDict({'hello': 'world'})
85 dict_b = OrderedDict({'foo': 'bar'})
87 expected = OrderedDict(
99 dict_a = OrderedDict({'hello': 'world'})
[all …]
/external/python/cpython3/Lib/test/test_json/
Dtest_decode.py3 from collections import OrderedDict
31 od = self.loads(s, object_pairs_hook=OrderedDict)
32 self.assertEqual(od, OrderedDict(p))
33 self.assertEqual(type(od), OrderedDict)
35 self.assertEqual(self.loads(s, object_pairs_hook=OrderedDict,
37 OrderedDict(p))
39 self.assertEqual(self.loads('{}', object_pairs_hook=OrderedDict),
40 OrderedDict())
42 object_pairs_hook=OrderedDict),
43 OrderedDict([('empty', OrderedDict())]))
Dtest_unicode.py2 from collections import OrderedDict
88 od = self.loads(s, object_pairs_hook = OrderedDict)
89 self.assertEqual(od, OrderedDict(p))
90 self.assertEqual(type(od), OrderedDict)
92 self.assertEqual(self.loads(s, object_pairs_hook = OrderedDict,
94 OrderedDict(p))
/external/rust/crates/grpcio-sys/grpc/tools/interop_matrix/
Dclient_matrix.py18 from collections import OrderedDict
79 OrderedDict([
118 OrderedDict([
192 OrderedDict([
263 OrderedDict([
326 OrderedDict([
342 OrderedDict([
392 OrderedDict([
431 OrderedDict([
/external/python/pyee/pyee/
Dbase.py3 from collections import OrderedDict
121 self._events[event] = OrderedDict()
152 funcs = list(self._events.get(event, OrderedDict()).values())
233 self._events[event] = OrderedDict()
239 return list(self._events.get(event, OrderedDict()).keys())
/external/python/cpython3/Mac/Tools/
Dplistlib_generate_testdata.py11 from collections import OrderedDict
25 pl = OrderedDict()
37 pl[nsstr('aDict')] = d = OrderedDict()
42 d[nsstr('deeperDict')] = dd = OrderedDict()
/external/tensorflow/tensorflow/python/tpu/
Dtpu_embedding_gradient.py44 feature_to_gradient_dict = collections.OrderedDict(
67 dummy_table_variables = collections.OrderedDict()
114 new_activations = collections.OrderedDict()
164 feature_to_gradient_dict = collections.OrderedDict()
/external/vulkan-validation-layers/scripts/
Dcommon_codegen.py23 from collections import namedtuple, OrderedDict
77 class HandleDict(OrderedDict):
92 type_categories = OrderedDict()
/external/tensorflow/tensorflow/dtensor/python/
Dsave_restore.py178 if not isinstance(name_tensor_dict, collections.OrderedDict):
179 ordered_name_tensor_dict = collections.OrderedDict(name_tensor_dict)
221 return collections.OrderedDict(
247 if not isinstance(name_tensor_dict, collections.OrderedDict):
248 ordered_name_tensor_dict = collections.OrderedDict(name_tensor_dict)
/external/mesa3d/src/intel/genxml/
Dgen_sort_tags.py5 from collections import OrderedDict
55 self.deps = OrderedDict()
58 deps = OrderedDict()
131 sorted_structs = OrderedDict()
/external/python/pyee/tests/
Dtest_sync.py2 from collections import OrderedDict
119 assert ee._events["event"] == OrderedDict(
125 assert ee._events["event"] == OrderedDict(
130 assert ee._events["event"] == OrderedDict([(third, third), (fourth, fourth)])

12345678910>>...13