def test_less_than_one_passenger(self): argv = ['', '3.410632,-2.157533', '3.410632,-2.157533', '0'] with self.assertRaises(ValueError): check_user_input(argv)
def test_too_many_passengers(self): argv = ['', '3.410632,-2.157533', '3.410632,-2.157533', '17'] with self.assertRaises(ValueError): check_user_input(argv)
def test_lon2_out_of_range(self): argv = ['', '3.410632,-2.157533', '3.410632,-200.157533', '3'] with self.assertRaises(ValueError): check_user_input(argv)
def test_invalid_passenger_field(self): argv = ['', '3.410632,-2.157533', '3.410632,-2.157533', 'HelloIAmNotANumber'] with self.assertRaises(ValueError): check_user_input(argv)
def test_incorrect_argument_length(self): argv = ['', '3.410632,-2.157533'] with self.assertRaises(ValueError): check_user_input(argv)
def test_working_arguments(self): try: argv = ['', '3.410632,-2.157533', '3.410632,-2.157533', '3'] check_user_input(argv) except: self.fail("Unexpected error raised with working arguments")