Beispiel #1
0
 def test_decode_rvr_with_no_change(self):
     val = "R20/1200N"
     decoder = MetarDecoderNZ()
     decoder.decode_rvr(val)
     res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
     assert_equals(res, "1,200 metres, no change (runway 20)")
Beispiel #2
0
 def test_decode_rvr_with_downward_trend(self):
     val = "R36/0500D"
     decoder = MetarDecoderNZ()
     decoder.decode_rvr(val)
     res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
     assert_equals(res, "500 metres, trending downward (runway 36)")
Beispiel #3
0
 def test_decode_rvr_with_upward_trend(self):
     val = "R02C/0200U"
     decoder = MetarDecoderNZ()
     decoder.decode_rvr(val)
     res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
     assert_equals(res, "200 metres, trending upward (runway 02C)")
Beispiel #4
0
 def test_decode_rvr_with_less_than_modifier(self):
     val = "R10/M0050"
     decoder = MetarDecoderNZ()
     decoder.decode_rvr(val)
     res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
     assert_equals(res, "less than 50 metres (runway 10)")
Beispiel #5
0
 def test_decode_rvr_with_more_than_modifier(self):
     val = "R36/P2000"
     decoder = MetarDecoderNZ()
     decoder.decode_rvr(val)
     res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
     assert_equals(res, "more than 2,000 metres (runway 36)")
Beispiel #6
0
 def test_decode_rvr(self):
     val = "R30/0500"
     decoder = MetarDecoderNZ()
     decoder.decode_rvr(val)
     res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
     assert_equals(res, "500 metres (runway 30)")
Beispiel #7
0
 def test_decode_rvr_with_parallel_runways(self):
     val = "R23L/1400"
     decoder = MetarDecoderNZ()
     decoder.decode_rvr(val)
     res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
     assert_equals(res, "1,400 metres (runway 23L)")
 def test_decode_rvr_with_upward_trend(self):
   val = "R02C/0200U"
   decoder = MetarDecoderNZ()
   decoder.decode_rvr(val)
   res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
   assert_equals(res, "200 metres, trending upward (runway 02C)")
 def test_decode_rvr_with_no_change(self):
   val = "R20/1200N"
   decoder = MetarDecoderNZ()
   decoder.decode_rvr(val)
   res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
   assert_equals(res, "1,200 metres, no change (runway 20)")
 def test_decode_rvr_with_downward_trend(self):
   val = "R36/0500D"
   decoder = MetarDecoderNZ()
   decoder.decode_rvr(val)
   res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
   assert_equals(res, "500 metres, trending downward (runway 36)")
 def test_decode_rvr_with_more_than_modifier(self):
   val = "R36/P2000"
   decoder = MetarDecoderNZ()
   decoder.decode_rvr(val)
   res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
   assert_equals(res, "more than 2,000 metres (runway 36)")
 def test_decode_rvr_with_less_than_modifier(self):
   val = "R10/M0050"
   decoder = MetarDecoderNZ()
   decoder.decode_rvr(val)
   res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
   assert_equals(res, "less than 50 metres (runway 10)")
 def test_decode_rvr_with_parallel_runways(self):
   val = "R23L/1400"
   decoder = MetarDecoderNZ()
   decoder.decode_rvr(val)
   res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
   assert_equals(res, "1,400 metres (runway 23L)")
 def test_decode_rvr(self):
   val = "R30/0500"
   decoder = MetarDecoderNZ()
   decoder.decode_rvr(val)
   res = decoder.decoded_metar["rvr"][self.DECODED_KEY]
   assert_equals(res, "500 metres (runway 30)")