mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-30 19:33:45 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user