Lines Matching refs:OrderedDict
5 from collections import namedtuple, Counter, OrderedDict
769 OrderedDict([('a', 1), ('b', 2)], None) # too many args
771 self.assertEqual(sorted(OrderedDict(dict(pairs)).items()), pairs) # dict input
772 self.assertEqual(sorted(OrderedDict(**dict(pairs)).items()), pairs) # kwds input
773 self.assertEqual(list(OrderedDict(pairs).items()), pairs) # pairs input
774 self.assertEqual(list(OrderedDict([('a', 1), ('b', 2), ('c', 9), ('d', 4)],
778 self.assertEqual(inspect.getargspec(OrderedDict.__dict__['__init__']).args,
782 OrderedDict([('a', 1), ('b', 2), ('c', 3), ('d', 44), ('e', 55)])
789 OrderedDict().update([('a', 1), ('b', 2)], None) # too many args
791 od = OrderedDict()
794 od = OrderedDict()
797 od = OrderedDict()
800 od = OrderedDict()
806 od = OrderedDict()
809 od = OrderedDict()
812 od = OrderedDict()
819 d = OrderedDict([('a', 1), ('b', 2), ('c', 3), ('d', 44), ('e', 55)])
825 self.assertIsInstance(OrderedDict(), MutableMapping)
826 self.assertTrue(issubclass(OrderedDict, MutableMapping))
831 od = OrderedDict(pairs)
838 od = OrderedDict(pairs)
846 od = OrderedDict([('d', 1), ('b', 2), ('c', 3), ('a', 4), ('e', 5)])
855 od = OrderedDict(pairs)
869 od = OrderedDict(pairs)
879 od = OrderedDict(pairs)
890 class Missing(OrderedDict):
903 od1 = OrderedDict(pairs)
904 od2 = OrderedDict(pairs)
907 od2 = OrderedDict(pairs)
913 self.assertNotEqual(od1, OrderedDict(pairs[:-1]))
919 od = OrderedDict(pairs)
920 update_test = OrderedDict()
932 OrderedDict(od),
944 od = OrderedDict(pairs)
946 # '!!python/object/apply:__main__.OrderedDict\n- - [a, 1]\n - [b, 2]\n'
952 od = OrderedDict(pairs)
958 od = OrderedDict([('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)])
960 "OrderedDict([('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)])")
962 self.assertEqual(repr(OrderedDict()), "OrderedDict()")
966 od = OrderedDict.fromkeys('abc')
969 "OrderedDict([('a', None), ('b', None), ('c', None), ('x', ...)])")
974 od = OrderedDict(pairs)
984 class Missing(OrderedDict):
992 od = OrderedDict()
1001 od = OrderedDict.fromkeys(s)
1008 class MyOD(OrderedDict):
1015 type2test = OrderedDict
1021 class MyOrderedDict(OrderedDict):