def test_decode_vis_single_mile_isnt_pluralized(self): val = "1SM" decoder = MetarDecoderDefault() decoder.decode_vis(val) res = decoder.decoded_metar["vis"][self.DECODED_KEY] assert_equals(res, "1 statute mile")
def test_decode_vis_with_fractional_part(self): val = "1 1/4SM" decoder = MetarDecoderDefault() decoder.decode_vis(val) res = decoder.decoded_metar["vis"][self.DECODED_KEY] assert_equals(res, "1 1/4 statute miles")
def test_decode_vis_less_than_quarter_mile(self): val = "M1/4SM" decoder = MetarDecoderDefault() decoder.decode_vis(val) res = decoder.decoded_metar["vis"][self.DECODED_KEY] assert_equals(res, "less than 1/4 statute mile")
def test_decode_vis(self): val = "10SM" decoder = MetarDecoderDefault() decoder.decode_vis(val) res = decoder.decoded_metar["vis"][self.DECODED_KEY] assert_equals(res, "10 statute miles")
def test_decode_vis_single_mile_isnt_pluralized(self): val = "1SM" decoder = MetarDecoderDefault() decoder.decode_vis(val) res = decoder.decoded_metar["vis"][self.DECODED_KEY] assert_equals(res, "1 statute mile")
def test_decode_vis_less_than_quarter_mile(self): val = "M1/4SM" decoder = MetarDecoderDefault() decoder.decode_vis(val) res = decoder.decoded_metar["vis"][self.DECODED_KEY] assert_equals(res, "less than 1/4 statute mile")
def test_decode_vis_with_fractional_part(self): val = "1 1/4SM" decoder = MetarDecoderDefault() decoder.decode_vis(val) res = decoder.decoded_metar["vis"][self.DECODED_KEY] assert_equals(res, "1 1/4 statute miles")
def test_decode_vis(self): val = "10SM" decoder = MetarDecoderDefault() decoder.decode_vis(val) res = decoder.decoded_metar["vis"][self.DECODED_KEY] assert_equals(res, "10 statute miles")