CI: use pytest for unittesting (#29709)

* switch to pytest

* static analysis

* fix the helpers

* static analysis

* remove that

* more parallel test

* cleanup

* static analysis

* durations min and tolerance

* reduce those iterations

* sleep time could be decreased too

* in case it's negative

* try using caching

* remove parallelization for first PR

* PR Cleanup

* reduce diff

* fix that

* bump panda
old-commit-hash: ca435d344714f08276f9f9da5039f730987f31fa
This commit is contained in:
Justin Newberry
2023-09-04 11:54:35 -07:00
committed by GitHub
parent d32d4962af
commit 839e72de70
8 changed files with 36 additions and 23 deletions
+3 -1
View File
@@ -7,7 +7,7 @@ import unittest
import cereal.messaging as messaging
from openpilot.selfdrive.manager.process_config import managed_processes
from openpilot.system.swaglog import cloudlog, ipchandler
from selfdrive.test.helpers import temporary_swaglog_dir
from openpilot.selfdrive.test.helpers import temporary_swaglog_dir, temporary_swaglog_ipc
class TestLogmessaged(unittest.TestCase):
@@ -35,6 +35,7 @@ class TestLogmessaged(unittest.TestCase):
return list(glob.glob(os.path.join(self.temp_dir, "swaglog.*")))
@temporary_swaglog_dir
@temporary_swaglog_ipc
def test_simple_log(self, temp_dir):
self._setup(temp_dir)
msgs = [f"abc {i}" for i in range(10)]
@@ -46,6 +47,7 @@ class TestLogmessaged(unittest.TestCase):
assert len(self._get_log_files()) >= 1
@temporary_swaglog_dir
@temporary_swaglog_ipc
def test_big_log(self, temp_dir):
self._setup(temp_dir)
n = 10