예제 #1
0
 def test_enumerate_float(self):
     rng = Range(0, .4, .2)
     items = [i for i in rng.enumerate()]
     self.assertEqual(items, [(0, 0), (1, .2), (2, .4)])
예제 #2
0
 def test_enumerate_int(self):
     rng = Range(0, 4, 2)
     items = [i for i in rng.enumerate()]
     self.assertEqual(items, [(0, 0), (1, 2), (2, 4)])