Better function naming

pull/62/head
Konstantin Gründger 2018-04-20 18:52:00 +02:00
rodzic 6e0271cfc1
commit 80b5cc4a48
7 zmienionych plików z 11 dodań i 11 usunięć

Wyświetl plik

@ -5,13 +5,13 @@ from ogn.parser.aprs_comment.fanet_parser import FanetParser
class TestStringMethods(unittest.TestCase):
def test_regular_beacon(self):
def test_position_comment(self):
message = FanetParser.parse_position("id1E1103CE -02fpm")
self.assertEqual(message['id'], "1E1103CE")
self.assertAlmostEqual(message['climb_rate'] * ms2fpm, -2, 0.1)
def test_pseudo_status_beacon(self):
def test_pseudo_status_comment(self):
message = FanetParser.parse_position("")
self.assertIsNone(message['id'])

Wyświetl plik

@ -5,7 +5,7 @@ from ogn.parser.aprs_comment.lt24_parser import LT24Parser
class TestStringMethods(unittest.TestCase):
def test(self):
def test_position_comment(self):
message = LT24Parser.parse_position("id25387 +000fpm GPS")
self.assertEqual(message['id'], "25387")

Wyświetl plik

@ -4,17 +4,17 @@ from ogn.parser.aprs_comment.receiver_parser import ReceiverParser
class TestStringMethods(unittest.TestCase):
def test_position(self):
def test_position_comment(self):
message = ReceiverParser.parse_position("Antenna: chinese, on a pylon, 20 meter above ground")
self.assertEqual(message['user_comment'], "Antenna: chinese, on a pylon, 20 meter above ground")
def test_position_empty(self):
def test_position_comment_empty(self):
message = ReceiverParser.parse_position("")
self.assertIsNotNone(message)
def test_status(self):
def test_status_comment(self):
message = ReceiverParser.parse_status("v0.2.7.RPI-GPU CPU:0.7 RAM:770.2/968.2MB NTP:1.8ms/-3.3ppm +55.7C 7/8Acfts[1h] RF:+54-1.1ppm/-0.16dB/+7.1dB@10km[19481]/+16.8dB@10km[7/13]")
self.assertEqual(message['version'], "0.2.7")

Wyświetl plik

@ -5,7 +5,7 @@ from ogn.parser.aprs_comment.skylines_parser import SkylinesParser
class TestStringMethods(unittest.TestCase):
def test(self):
def test_position_comment(self):
message = SkylinesParser.parse_position("id2816 -015fpm")
self.assertEqual(message['id'], "2816")

Wyświetl plik

@ -4,7 +4,7 @@ from ogn.parser.aprs_comment.spider_parser import SpiderParser
class TestStringMethods(unittest.TestCase):
def test(self):
def test_position_comment(self):
message = SpiderParser.parse_position("id300234010617040 +19dB LWE 3D")
self.assertEqual(message['id'], "300234010617040")

Wyświetl plik

@ -4,7 +4,7 @@ from ogn.parser.aprs_comment.spot_parser import SpotParser
class TestStringMethods(unittest.TestCase):
def test(self):
def test_position_comment(self):
message = SpotParser.parse_position("id0-2860357 SPOT3 GOOD")
self.assertEqual(message['id'], "0-2860357")

Wyświetl plik

@ -5,7 +5,7 @@ from ogn.parser.aprs_comment.tracker_parser import TrackerParser
class TestStringMethods(unittest.TestCase):
def test_position_beacon(self):
def test_position_comment(self):
message = TrackerParser.parse_position("id072FD00F -058fpm +1.1rot FL003.12 32.8dB 0e -0.8kHz gps3x5")
self.assertEqual(message['address_type'], 3)
@ -20,7 +20,7 @@ class TestStringMethods(unittest.TestCase):
self.assertEqual(message['frequency_offset'], -0.8)
self.assertEqual(message['gps_status'], '3x5')
def test_status(self):
def test_status_comment(self):
message = TrackerParser.parse_status("h00 v00 9sat/1 164m 1002.6hPa +20.2degC 0% 3.34V 14/-110.5dBm 1/min")
self.assertEqual(message['hardware_version'], 0)