Lines Matching refs:enum
66 enum = enumerate variable in EnumerateTestCase
70 self.assertEqual(type(self.enum(self.seq)), self.enum)
71 e = self.enum(self.seq)
73 self.assertEqual(list(self.enum(self.seq)), self.res)
74 self.enum.__doc__
77 self.assertEqual(list(self.enum(G(self.seq))), self.res)
78 e = self.enum(G(''))
82 self.assertEqual(list(self.enum(I(self.seq))), self.res)
83 e = self.enum(I(''))
87 self.assertEqual(list(self.enum(Ig(self.seq))), self.res)
88 e = self.enum(Ig(''))
92 self.assertRaises(TypeError, self.enum, X(self.seq))
95 self.assertRaises(TypeError, list, self.enum(N(self.seq)))
98 self.assertRaises(ZeroDivisionError, list, self.enum(E(self.seq)))
101 self.assertRaises(TypeError, self.enum) # no arguments
102 self.assertRaises(TypeError, self.enum, 1) # wrong type (not iterable)
103 self.assertRaises(TypeError, self.enum, 'abc', 'a') # wrong type
104 self.assertRaises(TypeError, self.enum, 'abc', 2, 3) # too many arguments
118 enum = MyEnum variable in SubclassTestCase
224 e = self.enum(self.seq)
226 self.assertEqual(list(self.enum(self.seq)), self.res)
231 enum = lambda self, i: enumerate(i, start=11) member in TestStart
237 enum = lambda self, i: enumerate(i, start=sys.maxint+1) member in TestLongStart