<commit_before>import unittest

from ogn.parser.utils import FPM_TO_MS
from ogn.parser.aprs_comment.safesky_parser import SafeskyParser


class TestStringMethods(unittest.TestCase):
    def test_position_comment(self):
        # "SKY3E5906>OGNSKY,qAS,SafeSky:/072555h5103.47N/00524.81E'065/031/A=001250 !W05! id1C3E5906 +010fpm gps6x1"
        message = SafeskyParser().parse_position("id1C3E5906 +010fpm gps6x1")
        self.assertEqual(message['address'], '3E5906')
        self.assertEqual(message['address_type'], 0)
        self.assertEqual(message['aircraft_type'], 7)
        self.assertAlmostEqual(message['climb_rate'], 10 * FPM_TO_MS, 2)
        self.assertEqual(message['gps_quality'], {'horizontal': 6, 'vertical': 1})


if __name__ == '__main__':
    unittest.main()<commit_msg>add safesky stealth test in unit test<commit_after>import unittest

from ogn.parser.utils import FPM_TO_MS
from ogn.parser.aprs_comment.safesky_parser import SafeskyParser


class TestStringMethods(unittest.TestCase):
    def test_position_comment(self):
        # "SKY3E5906>OGNSKY,qAS,SafeSky:/072555h5103.47N/00524.81E'065/031/A=001250 !W05! id1C3E5906 +010fpm gps6x1"
        message = SafeskyParser().parse_position("id1C3E5906 +010fpm gps6x1")
        self.assertEqual(message['address'], '3E5906')
        self.assertEqual(message['address_type'], 0)
        self.assertEqual(message['aircraft_type'], 7)
        self.assertFalse(message['stealth'])
        self.assertAlmostEqual(message['climb_rate'], 10 * FPM_TO_MS, 2)
        self.assertEqual(message['gps_quality'], {'horizontal': 6, 'vertical': 1})


if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.12885662431941924, 'fraction_numerical': 0.08711433756805807, 'mean_word_length': 4.84452296819788, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6065805', 'n_tokens_mistral': 674, 'n_tokens_neox': 584, 'n_words': 90}