Lines Matching refs:UserDict
15 type2test = collections.UserDict
19 u = collections.UserDict()
20 u0 = collections.UserDict(d0)
21 u1 = collections.UserDict(d1)
22 u2 = collections.UserDict(d2)
24 uu = collections.UserDict(u)
25 uu0 = collections.UserDict(u0)
26 uu1 = collections.UserDict(u1)
27 uu2 = collections.UserDict(u2)
30 self.assertEqual(collections.UserDict(one=1, two=2), d2)
32 self.assertEqual(collections.UserDict([('one',1), ('two',2)]), d2)
33 self.assertEqual(collections.UserDict(dict=[('one',1), ('two',2)]),
36 self.assertEqual(collections.UserDict([('one',1), ('two',2)], two=3, three=5), d3)
39 self.assertEqual(collections.UserDict.fromkeys('one two'.split()), d4)
40 self.assertEqual(collections.UserDict().fromkeys('one two'.split()), d4)
41 self.assertEqual(collections.UserDict.fromkeys('one two'.split(), 1), d5)
42 self.assertEqual(collections.UserDict().fromkeys('one two'.split(), 1), d5)
44 self.assertIsInstance(u1.fromkeys('one two'.split()), collections.UserDict)
45 self.assertIsInstance(u2.fromkeys('one two'.split()), collections.UserDict)
64 u3 = collections.UserDict(u2)
79 u2b = collections.UserDict(x=42, y=23)
83 class MyUserDict(collections.UserDict):
106 t = collections.UserDict()
126 t = collections.UserDict()
132 t = collections.UserDict(x=42)
140 t = collections.UserDict(x=42)
146 self.assertEqual(list(collections.UserDict(**{kw: 42}).items()),
148 self.assertEqual(list(collections.UserDict({}, dict=42).items()),
150 self.assertEqual(list(collections.UserDict({}, dict=None).items()),
152 self.assertEqual(list(collections.UserDict(dict={'a': 42}).items()),
154 self.assertRaises(TypeError, collections.UserDict, 42)
155 self.assertRaises(TypeError, collections.UserDict, (), ())
156 self.assertRaises(TypeError, collections.UserDict.__init__)
160 d = collections.UserDict()
163 self.assertRaises(TypeError, collections.UserDict().update, 42)
164 self.assertRaises(TypeError, collections.UserDict().update, {}, {})
165 self.assertRaises(TypeError, collections.UserDict.update)
169 self.assertEqual(hasattr(collections.UserDict, "__missing__"), False)
175 class D(collections.UserDict):
184 class E(collections.UserDict):
194 class F(collections.UserDict):
198 collections.UserDict.__init__(self)
206 class G(collections.UserDict):