def test_one_of_each_speed_input_min_under8point5(self): km_to_nm = 0.539957 speeds = [] for i in range(1, 20): speeds.append(i / km_to_nm) m = tc.modesp(speeds) self.assertEqual(8.5 / km_to_nm, m)
def test_single_speed_input_overmaximum(self): km_to_nm = 0.539957 speeds = [ 200.0 / km_to_nm, 200.0 / km_to_nm, 200.0 / km_to_nm, 200.0 / km_to_nm, 200.0 / km_to_nm, 200.0 / km_to_nm ] m = tc.modesp(speeds) self.assertEqual(34.5 / km_to_nm, m)
def test_single_speed_input_under8point5(self): km_to_nm = 0.539957 speeds = [ 2.0 / km_to_nm, 2.0 / km_to_nm, 2.0 / km_to_nm, 2.0 / km_to_nm, 2.0 / km_to_nm, 2.0 / km_to_nm ] m = tc.modesp(speeds) self.assertEqual(8.5 / km_to_nm, m)
def test_one_input(self): m = tc.modesp([17.0]) self.assertEqual(None, m)
def test_noinput(self): m = tc.modesp([]) self.assertEqual(None, m)