Pytest: tici mark for skipping on-device tests (#30412)

* mark tici

* not those ones

* missed that one

* add those

* add pypoetry

* oops
old-commit-hash: aec7cea30d48dc8915eea38c86de7d4effa0548d
This commit is contained in:
Justin Newberry
2023-11-07 20:35:44 -05:00
committed by GitHub
parent 7bd8c5425b
commit 3027a428cb
19 changed files with 45 additions and 49 deletions
+3 -4
View File
@@ -1,20 +1,19 @@
#!/usr/bin/env python3
import pytest
import time
import unittest
import numpy as np
from openpilot.system.hardware import TICI
from openpilot.system.hardware.tici.hardware import Tici
HARDWARE = Tici()
@pytest.mark.tici
class TestHardware(unittest.TestCase):
@classmethod
def setUpClass(cls):
if not TICI:
raise unittest.SkipTest
HARDWARE.initialize_hardware()
HARDWARE.set_power_save(False)
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
import pytest
import unittest
import time
import threading
@@ -9,7 +10,7 @@ from typing import List
import cereal.messaging as messaging
from cereal.services import SERVICE_LIST
from openpilot.system.hardware import HARDWARE, TICI
from openpilot.system.hardware import HARDWARE
from openpilot.system.hardware.tici.power_monitor import get_power
from openpilot.selfdrive.manager.process_config import managed_processes
from openpilot.selfdrive.manager.manager import manager_cleanup
@@ -44,13 +45,9 @@ def send_llk_msg(done):
time.sleep(1/20.)
@pytest.mark.tici
class TestPowerDraw(unittest.TestCase):
@classmethod
def setUpClass(cls):
if not TICI:
raise unittest.SkipTest
def setUp(self):
HARDWARE.initialize_hardware()
HARDWARE.set_power_save(False)