pytest unit test running (#29261)

* setup config

* collect passes

* pytest system/ works
old-commit-hash: 670fa9af5f
beeps
Adeeb Shihadeh 2 years ago committed by GitHub
parent 7797d908a0
commit b7f6b6dc95
  1. 6
      pyproject.toml
  2. 2
      selfdrive/test/test_onroad.py
  3. 3
      system/camerad/test/test_exposure.py

@ -1,3 +1,9 @@
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--ignore=panda/ --ignore=rednose_repo/ --ignore=tinygrad_repo/ --ignore=laika_repo/"
python_files = "test_*.py"
timeout = "30" # you get this long by default
[tool.poetry]
name = "openpilot"
version = "0.1.0"

@ -69,7 +69,7 @@ PROCS.update({
"./boardd": 19.0,
"system.sensord.rawgps.rawgpsd": 1.0,
}
}[HARDWARE.get_device_type()])
}.get(HARDWARE.get_device_type(), {}))
TIMINGS = {
# rtols: max/min, rsd

@ -3,7 +3,7 @@ import time
import unittest
import numpy as np
from selfdrive.test.helpers import with_processes
from selfdrive.test.helpers import with_processes, phone_only
from system.camerad.snapshot.snapshot import get_snapshots
TEST_TIME = 45
@ -28,6 +28,7 @@ class TestCamerad(unittest.TestCase):
print([i_median, i_mean])
return med_ex[0] < i_median < med_ex[1] and mean_ex[0] < i_mean < mean_ex[1]
@phone_only
@with_processes(['camerad'])
def test_camera_operation(self):
passed = 0

Loading…
Cancel
Save