diff --git a/conftest.py b/conftest.py index a01ddc2f6bd8de..f2fd482be9947f 100644 --- a/conftest.py +++ b/conftest.py @@ -7,24 +7,16 @@ from openpilot.system.manager import manager from openpilot.system.hardware import TICI, HARDWARE -# TODO: pytest-cpp doesn't support FAIL, and we need to create test translations in sessionstart -# pending https://github.com/pytest-dev/pytest-cpp/pull/147 +# these are heavy CI-only tests, invoked explicitly in .github/workflows/tests.yaml collect_ignore = [ "selfdrive/test/process_replay/test_processes.py", "selfdrive/test/process_replay/test_regen.py", ] collect_ignore_glob = [ "selfdrive/debug/*.py", - "selfdrive/modeld/*.py", ] -def pytest_sessionstart(session): - # TODO: fix tests and enable test order randomization - if session.config.pluginmanager.hasplugin('randomly'): - session.config.option.randomly_reorganize = False - - @pytest.hookimpl(hookwrapper=True, trylast=True) def pytest_runtest_call(item): # ensure we run as a hook after capturemanager's @@ -96,15 +88,3 @@ def pytest_collection_modifyitems(config, items): class_property_name = item.get_closest_marker('xdist_group_class_property').args[0] class_property_value = getattr(item.cls, class_property_name) item.add_marker(pytest.mark.xdist_group(class_property_value)) - - -@pytest.hookimpl(trylast=True) -def pytest_configure(config): - config_line = "xdist_group_class_property: group tests by a property of the class that contains them" - config.addinivalue_line("markers", config_line) - - config_line = "nocapture: don't capture test output" - config.addinivalue_line("markers", config_line) - - config_line = "shared_download_cache: share download cache between tests" - config.addinivalue_line("markers", config_line) diff --git a/pyproject.toml b/pyproject.toml index 75240aa05c5076..c7358b0585f983 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -136,7 +136,10 @@ asyncio_default_fixture_loop_scope = "function" markers = [ "slow: tests that take awhile to run and can be skipped with -m 'not slow'", "tici: tests that are only meant to run on the C3/C3X", - "skip_tici_setup: mark test to skip tici setup fixture" + "skip_tici_setup: mark test to skip tici setup fixture", + "nocapture: don't capture test output", + "shared_download_cache: share download cache between tests", + "xdist_group_class_property: group tests by a property of the class that contains them", ] testpaths = [ "common",