예제 #1
0
 def summary(self) -> str:
     """
     Condensed report summary created from translations
     """
     if not self.translations:
         self.update()
     return summary.metar(self.translations)
예제 #2
0
 def summary(self) -> str:
     """
     Condensed report summary created from translations
     """
     if not self.translations:
         self.update()
     return summary.metar(self.translations)
예제 #3
0
 def test_metar(self):
     """
     Tests that METAR translations are summarized in the proper order
     """
     self.assertEqual(summary.metar(structs.MetarTrans(
         altimeter='29.92 inHg (1013 hPa)',
         clouds='Broken layer at 1500ft (Cumulonimbus) - Reported AGL',
         dewpoint='-1°C (30°F)',
         other='Heavy Rain',
         remarks={},
         temperature='3°C (37°F)',
         visibility='3sm (4.8km)',
         wind='N-360 (variable 340 to 020) at 12kt gusting to 20kt'
     )), (
         'Winds N-360 (variable 340 to 020) at 12kt gusting to 20kt, '
         'Vis 3sm, Temp 3°C, Dew -1°C, Alt 29.92 inHg, '
         'Heavy Rain, Broken layer at 1500ft (Cumulonimbus)'
     ))
예제 #4
0
 def test_metar(self):
     """
     Tests that METAR translations are summarized in the proper order
     """
     self.assertEqual(
         summary.metar(
             structs.MetarTrans(
                 altimeter='29.92 inHg (1013 hPa)',
                 clouds=
                 'Broken layer at 1500ft (Cumulonimbus) - Reported AGL',
                 dewpoint='-1°C (30°F)',
                 other='Heavy Rain',
                 remarks={},
                 temperature='3°C (37°F)',
                 visibility='3sm (4.8km)',
                 wind='N-360 (variable 340 to 020) at 12kt gusting to 20kt')
         ), ('Winds N-360 (variable 340 to 020) at 12kt gusting to 20kt, '
             'Vis 3sm, Temp 3°C, Dew -1°C, Alt 29.92 inHg, '
             'Heavy Rain, Broken layer at 1500ft (Cumulonimbus)'))
예제 #5
0
 def test_metar(self):
     """
     Tests that METAR translations are summarized in the proper order
     """
     self.assertEqual(
         summary.metar(
             structs.MetarTrans(
                 altimeter="29.92 inHg (1013 hPa)",
                 clouds="Broken layer at 1500ft (Cumulonimbus) - Reported AGL",
                 dewpoint="-1°C (30°F)",
                 other="Heavy Rain",
                 remarks={},
                 temperature="3°C (37°F)",
                 visibility="3sm (4.8km)",
                 wind="N-360 (variable 340 to 020) at 12kt gusting to 20kt",
             )
         ),
         (
             "Winds N-360 (variable 340 to 020) at 12kt gusting to 20kt, "
             "Vis 3sm, Temp 3°C, Dew -1°C, Alt 29.92 inHg, "
             "Heavy Rain, Broken layer at 1500ft (Cumulonimbus)"
         ),
     )