Lines Matching refs:UserDict
4 import UserDict
15 type2test = UserDict.IterableUserDict
19 u = UserDict.UserDict()
20 u0 = UserDict.UserDict(d0)
21 u1 = UserDict.UserDict(d1)
22 u2 = UserDict.IterableUserDict(d2)
24 uu = UserDict.UserDict(u)
25 uu0 = UserDict.UserDict(u0)
26 uu1 = UserDict.UserDict(u1)
27 uu2 = UserDict.UserDict(u2)
30 self.assertEqual(UserDict.UserDict(one=1, two=2), d2)
32 self.assertEqual(UserDict.UserDict([('one',1), ('two',2)]), d2)
35 self.assertEqual(UserDict.UserDict(dict=[('one',1), ('two',2)]), d2)
37 self.assertEqual(UserDict.UserDict([('one',1), ('two',2)], two=3, three=5), d3)
40 self.assertEqual(UserDict.UserDict.fromkeys('one two'.split()), d4)
41 self.assertEqual(UserDict.UserDict().fromkeys('one two'.split()), d4)
42 self.assertEqual(UserDict.UserDict.fromkeys('one two'.split(), 1), d5)
43 self.assertEqual(UserDict.UserDict().fromkeys('one two'.split(), 1), d5)
45 self.assertIsInstance(u1.fromkeys('one two'.split()), UserDict.UserDict)
46 self.assertIsInstance(u2.fromkeys('one two'.split()), UserDict.IterableUserDict)
64 u3 = UserDict.UserDict(u2)
79 u2b = UserDict.UserDict(x=42, y=23)
83 class MyUserDict(UserDict.UserDict):
110 t = UserDict.UserDict()
116 t = UserDict.UserDict()
136 t = UserDict.UserDict()
142 t = UserDict.UserDict(x=42)
150 t = UserDict.UserDict(x=42)
156 self.assertEqual(list(UserDict.UserDict(**{kw: 42}).items()),
158 self.assertEqual(list(UserDict.UserDict({}, dict=42).items()),
160 self.assertEqual(list(UserDict.UserDict({}, dict=None).items()),
164 self.assertEqual(list(UserDict.UserDict(dict={'a': 42}).items()),
166 self.assertRaises(TypeError, UserDict.UserDict, 42)
167 self.assertRaises(TypeError, UserDict.UserDict, (), ())
168 self.assertRaises(TypeError, UserDict.UserDict.__init__)
172 d = UserDict.UserDict()
175 d = UserDict.UserDict()
180 self.assertRaises(TypeError, UserDict.UserDict().update, 42)
181 self.assertRaises(TypeError, UserDict.UserDict().update, {}, {})
182 self.assertRaises(TypeError, UserDict.UserDict.update)
186 self.assertEqual(hasattr(UserDict, "__missing__"), False)
192 class D(UserDict.UserDict):
201 class E(UserDict.UserDict):
211 class F(UserDict.UserDict):
215 UserDict.UserDict.__init__(self)
223 class G(UserDict.UserDict):
236 class SeqDict(UserDict.DictMixin):