本文整理匯總了Python中metars.workers.decoders.nz.MetarDecoderNZ.decode_sky_condition方法的典型用法代碼示例。如果您正苦於以下問題:Python MetarDecoderNZ.decode_sky_condition方法的具體用法?Python MetarDecoderNZ.decode_sky_condition怎麽用?Python MetarDecoderNZ.decode_sky_condition使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類metars.workers.decoders.nz.MetarDecoderNZ
的用法示例。
在下文中一共展示了MetarDecoderNZ.decode_sky_condition方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_decode_sky_condition_multiple_layers
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_sky_condition [as 別名]
def test_decode_sky_condition_multiple_layers(self):
val = ["SCT016///", "BKN085///", "OVC100TCU"]
decoder = MetarDecoderNZ()
decoder.decode_sky_condition(val)
res = decoder.decoded_metar["sky_condition"][self.DECODED_KEY]
assert_equals(res, ["scattered clouds at 1,600 feet (no cloud type)",
"broken clouds at 8,500 feet (no cloud type)",
"overcast at 10,000 feet (towering cumulus)"])
示例2: test_decode_sky_condition_no_cloud_detected_nzaa_nzwn_nzch
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_sky_condition [as 別名]
def test_decode_sky_condition_no_cloud_detected_nzaa_nzwn_nzch(self):
val = ["NCD"]
decoder = MetarDecoderNZ()
# NZAA
decoder.decoded_metar["icao_id"][self.DECODED_KEY] = "NZAA"
decoder.decode_sky_condition(val)
res = decoder.decoded_metar["sky_condition"][self.DECODED_KEY]
assert_equals(res, ["no cloud detected below 10,000 feet"])
# NZAA
decoder.decoded_metar["icao_id"][self.DECODED_KEY] = "NZWN"
decoder.decode_sky_condition(val)
res = decoder.decoded_metar["sky_condition"][self.DECODED_KEY]
assert_equals(res, ["no cloud detected below 10,000 feet"])
# NZAA
decoder.decoded_metar["icao_id"][self.DECODED_KEY] = "NZCH"
decoder.decode_sky_condition(val)
res = decoder.decoded_metar["sky_condition"][self.DECODED_KEY]
assert_equals(res, ["no cloud detected below 10,000 feet"])
示例3: test_decode_sky_condition_towering_cumulus
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_sky_condition [as 別名]
def test_decode_sky_condition_towering_cumulus(self):
val = ["OVC030TCU"]
decoder = MetarDecoderNZ()
decoder.decode_sky_condition(val)
res = decoder.decoded_metar["sky_condition"][self.DECODED_KEY]
assert_equals(res, ["overcast at 3,000 feet (towering cumulus)"])
示例4: test_decode_sky_condition_cumulonimbus
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_sky_condition [as 別名]
def test_decode_sky_condition_cumulonimbus(self):
val = ["SCT085CB"]
decoder = MetarDecoderNZ()
decoder.decode_sky_condition(val)
res = decoder.decoded_metar["sky_condition"][self.DECODED_KEY]
assert_equals(res, ["scattered clouds at 8,500 feet (cumulonimbus)"])
示例5: test_decode_sky_condition_vertical_visibility
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_sky_condition [as 別名]
def test_decode_sky_condition_vertical_visibility(self):
val = ["OVC048///"]
decoder = MetarDecoderNZ()
decoder.decode_sky_condition(val)
res = decoder.decoded_metar["sky_condition"][self.DECODED_KEY]
assert_equals(res, ["overcast at 4,800 feet (no cloud type)"])
示例6: test_decode_sky_condition_sensor_inop
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_sky_condition [as 別名]
def test_decode_sky_condition_sensor_inop(self):
val = ["VV///"]
decoder = MetarDecoderNZ()
decoder.decode_sky_condition(val)
res = decoder.decoded_metar["sky_condition"][self.DECODED_KEY]
assert_equals(res, ["vertical visibility unavailable"])
示例7: test_decode_sky_condition_sky_clear_automated
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_sky_condition [as 別名]
def test_decode_sky_condition_sky_clear_automated(self):
val = ["CLR"]
decoder = MetarDecoderNZ()
decoder.decode_sky_condition(val)
res = decoder.decoded_metar["sky_condition"][self.DECODED_KEY]
assert_equals(res, ["no clouds below 12,000 feet"])
示例8: test_decode_sky_condition_no_cloud_detected_other_aerodromes
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_sky_condition [as 別名]
def test_decode_sky_condition_no_cloud_detected_other_aerodromes(self):
val = ["NCD"]
decoder = MetarDecoderNZ()
decoder.decode_sky_condition(val)
res = decoder.decoded_metar["sky_condition"][self.DECODED_KEY]
assert_equals(res, ["no cloud detected"])
示例9: test_decode_sky_condition_sky_clear
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_sky_condition [as 別名]
def test_decode_sky_condition_sky_clear(self):
val = ["SKC"]
decoder = MetarDecoderNZ()
decoder.decode_sky_condition(val)
res = decoder.decoded_metar["sky_condition"][self.DECODED_KEY]
assert_equals(res, ["sky clear"])
示例10: test_decode_sky_condition_basic
# 需要導入模塊: from metars.workers.decoders.nz import MetarDecoderNZ [as 別名]
# 或者: from metars.workers.decoders.nz.MetarDecoderNZ import decode_sky_condition [as 別名]
def test_decode_sky_condition_basic(self):
val = ["FEW020"]
decoder = MetarDecoderNZ()
decoder.decode_sky_condition(val)
res = decoder.decoded_metar["sky_condition"][self.DECODED_KEY]
assert_equals(res, ["few clouds at 2,000 feet"])