def test_min_timeout(self): self.assertEqual(under_test.MIN_TIMEOUT_SECONDS, under_test.calculate_timeout(15, 1))
def test_float_runtimes(self): self.assertEqual(360, under_test.calculate_timeout(300.14, 1))
def test_scaling_factor(self): avg_runtime = 30 scaling_factor = 10 self.assertEqual(avg_runtime * scaling_factor + 60, under_test.calculate_timeout(avg_runtime, scaling_factor))
def test_over_timeout_by_one_minute(self): self.assertEqual(360, under_test.calculate_timeout(301, 1))