def test_decode_wx_phenomena_tornado_waterspout_special_case(self):
   # +FC is a special case for tornadoes and waterspouts - the
   # modifier '+' should be ignored.
   val = ["+FC"]
   decoder = MetarDecoderDefault()
   decoder.decode_wx_phenomena(val)
   res = decoder.decoded_metar["wx_phenomena"][self.DECODED_KEY]
   assert_equals(res, ["funnel cloud (tornado or waterspout)"])
 def test_decode_wx_phenomena_tornado_waterspout_special_case(self):
     # +FC is a special case for tornadoes and waterspouts - the
     # modifier '+' should be ignored.
     val = ["+FC"]
     decoder = MetarDecoderDefault()
     decoder.decode_wx_phenomena(val)
     res = decoder.decoded_metar["wx_phenomena"][self.DECODED_KEY]
     assert_equals(res, ["funnel cloud (tornado or waterspout)"])
 def test_decode_wx_phenomena_modifiers(self):
     decoder = MetarDecoderDefault()
     # Light
     val = ["-PY"]
     decoder.decode_wx_phenomena(val)
     res = decoder.decoded_metar["wx_phenomena"][self.DECODED_KEY]
     assert_equals(res, ["light spray"])
     # Moderate
     val = ["PY"]
     decoder.decode_wx_phenomena(val)
     res = decoder.decoded_metar["wx_phenomena"][self.DECODED_KEY]
     assert_equals(res, ["moderate spray"])
     # Heavy
     val = ["+PY"]
     decoder.decode_wx_phenomena(val)
     res = decoder.decoded_metar["wx_phenomena"][self.DECODED_KEY]
     assert_equals(res, ["heavy spray"])
 def test_decode_wx_phenomena_modifiers(self):
   decoder = MetarDecoderDefault()
   # Light
   val = ["-PY"]
   decoder.decode_wx_phenomena(val)
   res = decoder.decoded_metar["wx_phenomena"][self.DECODED_KEY]
   assert_equals(res, ["light spray"])
   # Moderate
   val = ["PY"]
   decoder.decode_wx_phenomena(val)
   res = decoder.decoded_metar["wx_phenomena"][self.DECODED_KEY]
   assert_equals(res, ["moderate spray"])
   # Heavy
   val = ["+PY"]
   decoder.decode_wx_phenomena(val)
   res = decoder.decoded_metar["wx_phenomena"][self.DECODED_KEY]
   assert_equals(res, ["heavy spray"])
 def test_decode_wx_phenomena_multiple_values(self):
     val = ["-SHRA", "+BR"]
     decoder = MetarDecoderDefault()
     decoder.decode_wx_phenomena(val)
     res = decoder.decoded_metar["wx_phenomena"][self.DECODED_KEY]
     assert_equals(res, ["light showers of rain", "heavy mist"])
 def test_decode_wx_phenomena_in_the_vicinity(self):
     val = ["VCFG"]
     decoder = MetarDecoderDefault()
     decoder.decode_wx_phenomena(val)
     res = decoder.decoded_metar["wx_phenomena"][self.DECODED_KEY]
     assert_equals(res, ["fog in the vicinity"])
 def test_decode_wx_phenomena_basic(self):
     val = ["SHRA"]
     decoder = MetarDecoderDefault()
     decoder.decode_wx_phenomena(val)
     res = decoder.decoded_metar["wx_phenomena"][self.DECODED_KEY]
     assert_equals(res, ["moderate showers of rain"])
 def test_decode_wx_phenomena_multiple_values(self):
   val = ["-SHRA", "+BR"]
   decoder = MetarDecoderDefault()
   decoder.decode_wx_phenomena(val)
   res = decoder.decoded_metar["wx_phenomena"][self.DECODED_KEY]
   assert_equals(res, ["light showers of rain", "heavy mist"])
 def test_decode_wx_phenomena_in_the_vicinity(self):
   val = ["VCFG"]
   decoder = MetarDecoderDefault()
   decoder.decode_wx_phenomena(val)
   res = decoder.decoded_metar["wx_phenomena"][self.DECODED_KEY]
   assert_equals(res, ["fog in the vicinity"])
 def test_decode_wx_phenomena_basic(self):
   val = ["SHRA"]
   decoder = MetarDecoderDefault()
   decoder.decode_wx_phenomena(val)
   res = decoder.decoded_metar["wx_phenomena"][self.DECODED_KEY]
   assert_equals(res, ["moderate showers of rain"])