Exemplo n.º 1
0
 def test_min_timeout(self):
     self.assertEqual(under_test.MIN_TIMEOUT_SECONDS, under_test.calculate_timeout(15, 1))
Exemplo n.º 2
0
 def test_float_runtimes(self):
     self.assertEqual(360, under_test.calculate_timeout(300.14, 1))
Exemplo n.º 3
0
 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))
Exemplo n.º 4
0
 def test_over_timeout_by_one_minute(self):
     self.assertEqual(360, under_test.calculate_timeout(301, 1))