test for the strip_bz2_extension method (#24826)

pull/24725/head
Maykon Pacheco 3 years ago committed by GitHub
parent e375087720
commit 1847a70a47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      selfdrive/athena/tests/test_athenad.py

@ -120,6 +120,13 @@ class TestAthenadMethods(unittest.TestCase):
self.assertTrue(resp, 'list empty!') self.assertTrue(resp, 'list empty!')
self.assertCountEqual(resp, expected) self.assertCountEqual(resp, expected)
def test_strip_bz2_extension(self):
fn = os.path.join(athenad.ROOT, 'qlog.bz2')
Path(fn).touch()
if fn.endswith('.bz2'):
self.assertEqual(athenad.strip_bz2_extension(fn), fn[:-4])
@with_http_server @with_http_server
def test_do_upload(self, host): def test_do_upload(self, host):
fn = os.path.join(athenad.ROOT, 'qlog.bz2') fn = os.path.join(athenad.ROOT, 'qlog.bz2')

Loading…
Cancel
Save