def test_parse_automated_obs_flag_without_flag(self): ### If the AUTO flag is missing from the METAR, the obs_datetime ### field should be false and nothing stripped from the METAR parser = MetarParserDefault() tokens = '290653Z 00000KT'.split() res = parser.parse_automated_obs_flag(tokens) assert_equals(parser.parsed_metar["mod_auto"], False) assert_equals(res, ['290653Z', '00000KT'])
def test_parse_automated_obs_flag_with_flag(self): parser = MetarParserDefault() tokens = 'AUTO 00000KT'.split() res = parser.parse_automated_obs_flag(tokens) assert_equals(parser.parsed_metar["mod_auto"], True) assert_equals(res[0], '00000KT')