def test_set_speed_string_position(self): leader = Leader(test_mode=True) self.assertEqual(0, leader.set_speed("position"))
def test_set_speed_none_position(self): leader = Leader(test_mode=True) self.assertEqual(0, leader.set_speed(None))
def test_set_speed_above_upper_bound(self): leader = Leader(test_mode=True) self.assertEqual(MAX_SPEED, leader.set_speed(1.1))
def test_set_speed_zero_position(self): leader = Leader(test_mode=True) self.assertEqual(MAX_SPEED / 2, leader.set_speed(0.0))
def test_set_speed_below_lower_bound(self): leader = Leader(test_mode=True) self.assertEqual(0, leader.set_speed(-1.1))