From 88d0231095babbb1f572b86da060056286818da5 Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Thu, 8 Feb 2024 16:32:40 -0500 Subject: [PATCH] pytest: fix tici setup fixture (#31379) cleanup Co-authored-by: Comma Device --- conftest.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/conftest.py b/conftest.py index 544025e180..e4dc6640c0 100644 --- a/conftest.py +++ b/conftest.py @@ -63,13 +63,12 @@ def openpilot_class_fixture(): os.environ.update(starting_env) -@pytest.fixture(scope="class") -def tici_setup_fixture(): - """Ensure a consistent state for tests on-device""" +@pytest.fixture(scope="function") +def tici_setup_fixture(openpilot_function_fixture): + """Ensure a consistent state for tests on-device. Needs the openpilot function fixture to run first.""" HARDWARE.initialize_hardware() HARDWARE.set_power_save(False) os.system("pkill -9 -f athena") - os.system("rm /dev/shm/*") @pytest.hookimpl(tryfirst=True)