Exemplo n.º 1
0
 def test_decoded_wind_variation_missing(self):
     val = ""
     decoder = MetarDecoderNZ()
     decoder.decode_wind_dir_variation(val)
     # The decoder should handle an empty wind variation, and the keys
     # should exist in the decoded metar with empty values.
     res = decoder.decoded_metar["wind_dir_variation"][self.DECODED_KEY]
     assert_equals(res, "")
 def test_decoded_wind_variation_missing(self):
   val = ""
   decoder = MetarDecoderNZ()
   decoder.decode_wind_dir_variation(val)
   # The decoder should handle an empty wind variation, and the keys
   # should exist in the decoded metar with empty values.
   res = decoder.decoded_metar["wind_dir_variation"][self.DECODED_KEY]
   assert_equals(res, "")
Exemplo n.º 3
0
 def test_decode_wind_variation(self):
     val = "260V330"
     decoder = MetarDecoderNZ()
     decoder.decode_wind_dir_variation(val)
     res = decoder.decoded_metar["wind_dir_variation"][self.DECODED_KEY]
     assert_equals(res, "variable, from 260 degrees to 330 degrees")
 def test_decode_wind_variation(self):
   val = "260V330"
   decoder = MetarDecoderNZ()
   decoder.decode_wind_dir_variation(val)
   res = decoder.decoded_metar["wind_dir_variation"][self.DECODED_KEY]
   assert_equals(res, "variable, from 260 degrees to 330 degrees")