Exemplo n.º 1
0
 def test_altimeter(self):
     """
     Tests converting altimeter reading into a spoken string
     """
     for alt, unit, spoken in (
         ('', 'hPa', 'unknown'),
         ('1020', 'hPa', 'one zero two zero'),
         ('0999', 'hPa', 'zero nine nine nine'),
         ('1012', 'hPa', 'one zero one two'),
         ('3000', 'inHg', 'three zero point zero zero'),
         ('2992', 'inHg', 'two nine point nine two'),
         ('3005', 'inHg', 'three zero point zero five'),
     ):
         self.assertEqual(speech.altimeter(core.make_number(alt), unit), 'Altimeter ' + spoken)
Exemplo n.º 2
0
 def test_altimeter(self):
     """
     Tests converting altimeter reading into a spoken string
     """
     for alt, unit, spoken in (
         ('', 'hPa', 'unknown'),
         ('1020', 'hPa', 'one zero two zero'),
         ('0999', 'hPa', 'zero nine nine nine'),
         ('1012', 'hPa', 'one zero one two'),
         ('3000', 'inHg', 'three zero point zero zero'),
         ('2992', 'inHg', 'two nine point nine two'),
         ('3005', 'inHg', 'three zero point zero five'),
     ):
         self.assertEqual(speech.altimeter(core.make_number(alt), unit), 'Altimeter ' + spoken)
Exemplo n.º 3
0
 def test_altimeter(self):
     """
     Tests converting altimeter reading into a spoken string
     """
     for alt, unit, spoken in (
         ("", "hPa", "unknown"),
         ("1020", "hPa", "one zero two zero"),
         ("0999", "hPa", "zero nine nine nine"),
         ("1012", "hPa", "one zero one two"),
         ("3000", "inHg", "three zero point zero zero"),
         ("2992", "inHg", "two nine point nine two"),
         ("3005", "inHg", "three zero point zero five"),
     ):
         self.assertEqual(speech.altimeter(_core.make_number(alt), unit),
                          "Altimeter " + spoken)