當前位置: 首頁>>代碼示例>>Python>>正文


Python MetarDecoderNZ.decode_rvr方法代碼示例

本文整理匯總了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)")
開發者ID:peterussell,項目名稱:wxdecoder.com,代碼行數:8,代碼來源:metar_decoder_tests_nz.py

示例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)")
開發者ID:peterussell,項目名稱:wxdecoder.com,代碼行數:8,代碼來源:metar_decoder_tests_nz.py

示例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)")
開發者ID:peterussell,項目名稱:wxdecoder.com,代碼行數:8,代碼來源:metar_decoder_tests_nz.py

示例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)")
開發者ID:peterussell,項目名稱:wxdecoder.com,代碼行數:8,代碼來源:metar_decoder_tests_nz.py

示例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)")
開發者ID:peterussell,項目名稱:wxdecoder.com,代碼行數:8,代碼來源:metar_decoder_tests_nz.py

示例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)")
開發者ID:peterussell,項目名稱:wxdecoder.com,代碼行數:8,代碼來源:metar_decoder_tests_nz.py

示例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)")
開發者ID:peterussell,項目名稱:wxdecoder.com,代碼行數:8,代碼來源:metar_decoder_tests_nz.py


注:本文中的metars.workers.decoders.nz.MetarDecoderNZ.decode_rvr方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。