Ejemplo n.º 1
0
 def test_min_timeout(self):
     self.assertEqual(
         under_test.MIN_TIMEOUT_SECONDS + under_test.AVG_SETUP_TIME,
         under_test.calculate_timeout(15, 1))
Ejemplo n.º 2
0
 def test_float_runtimes(self):
     self.assertEqual(660, under_test.calculate_timeout(300.14, 1))
Ejemplo n.º 3
0
 def test_scaling_factor(self):
     scaling_factor = 10
     self.assertEqual(
         under_test.MIN_TIMEOUT_SECONDS * scaling_factor +
         under_test.AVG_SETUP_TIME,
         under_test.calculate_timeout(30, scaling_factor))
Ejemplo n.º 4
0
 def test_over_timeout_by_one_minute(self):
     self.assertEqual(660, under_test.calculate_timeout(301, 1))