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)])
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)])