def test_one_argument_float_exclusive(self): try: old_range(1.0) assert False except AssertionError: raise except Exception as ex: with self.assertRaises(type(ex)): new_range(1.0)
def test_zero_argument_exclusive(self): try: # Deliberate error old_range() assert False except AssertionError: raise except Exception as ex: # Same error? with self.assertRaises(type(ex)): new_range()
def test_three_argument_exclusive(self): for (m, n) in product(RANGE(-5, 6), repeat=2): for s in [-2, -1, 1, 2]: a = new_range(m, n, s) b = old_range(m, n, s) self.assertEqual(a, b)
def test_two_argument_exclusive(self): for (m, n) in product(RANGE(-5, 6), repeat=2): a = new_range(m, n) b = old_range(m, n) self.assertEqual(a, b)
def test_one_argument_exclusive(self): for n in RANGE(-5, 6): a = new_range(n) b = old_range(n) self.assertEqual(a, b)