def test_parse_LAT_LONG_wrong_format(self): with self.assertRaises(Exception): mas.parse_LAT_LONG('LAT_LONG 59.17 18.3 23') with self.assertRaises(Exception): mas.parse_LAT_LONG('LAT_LONG 59.17') with self.assertRaises(Exception): mas.parse_LAT_LONG('LAT_LONG aa bb')
def test_parse_LAT_LONG_pass(self): lat_long = mas.parse_LAT_LONG('LAT_LONG 59.17 18.3') self.assertTrue(lat_long[0] == 59.17) self.assertTrue(lat_long[1] == 18.3)