Home
last modified time | relevance | path

Searched refs:MyIndexable (Results 1 – 3 of 3) sorted by relevance

/third_party/python/Lib/test/
Dtest_slice.py64 class MyIndexable(object): class
222 self.assertEqual(slice(MyIndexable(0), 10, 1).indices(5), (0, 5, 1))
223 self.assertEqual(slice(0, MyIndexable(10), 1).indices(5), (0, 5, 1))
224 self.assertEqual(slice(0, 10, MyIndexable(1)).indices(5), (0, 5, 1))
225 self.assertEqual(slice(0, 10, 1).indices(MyIndexable(5)), (0, 5, 1))
Dtest_int.py282 class MyIndexable(object): class
294 self.assertEqual(int('101', base=MyIndexable(2)), 5)
295 self.assertEqual(int('101', base=MyIndexable(10)), 101)
296 self.assertEqual(int('101', base=MyIndexable(36)), 1 + 36**2)
Dtest_math.py230 class MyIndexable(object): class
729 self.assertEqual(gcd(MyIndexable(120), MyIndexable(84)), 12)
1077 self.assertEqual(lcm(MyIndexable(120), MyIndexable(84)), 840)
1916 self.assertEqual(perm(MyIndexable(5), MyIndexable(2)), 20)
1919 self.assertIs(type(perm(MyIndexable(5), MyIndexable(k))), int)
1986 self.assertEqual(comb(MyIndexable(5), MyIndexable(2)), 10)
1989 self.assertIs(type(comb(MyIndexable(5), MyIndexable(k))), int)