本文整理匯總了Python中metars.workers.decoders.nz.MetarDecoderNZ.decode_rvr方法的典型用法代碼示例。如果您正苦於以下問題:Python MetarDecoderNZ.decode_rvr方法的具體用法?Python MetarDecoderNZ.decode_rvr怎麽用?Python MetarDecoderNZ.decode_rvr使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類metars.workers.decoders.nz.MetarDecoderNZ
的用法示例。
在下文中一共展示了MetarDecoderNZ.decode_rvr方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_decode_rvr_with_upward_trend
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_rvr [as 別名]
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)")
示例2: test_decode_rvr_with_no_change
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_rvr [as 別名]
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)")
示例3: test_decode_rvr_with_downward_trend
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_rvr [as 別名]
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)")
示例4: test_decode_rvr_with_more_than_modifier
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_rvr [as 別名]
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)")
示例5: test_decode_rvr_with_less_than_modifier
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_rvr [as 別名]
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)")
示例6: test_decode_rvr_with_parallel_runways
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_rvr [as 別名]
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)")
示例7: test_decode_rvr
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_rvr [as 別名]
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)")