diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3fd7f0f..a5fcdc1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: pre-commit run --all-files - name: Run unit tests - run: poetry run pytest + run: poetry run pytest --no-device build: #needs: test diff --git a/tests/conftest.py b/tests/conftest.py index 9040b97..7184a3b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,2 +1,3 @@ def pytest_addoption(parser): parser.addoption("--reader", action="store") + parser.addoption("--no-device", action="store_true") diff --git a/tests/device/conftest.py b/tests/device/conftest.py index 5446ee2..8b38e1e 100644 --- a/tests/device/conftest.py +++ b/tests/device/conftest.py @@ -237,6 +237,9 @@ def setup(self): @pytest.fixture(scope="session", autouse=True) def dev_manager(pytestconfig, request): + if pytestconfig.getoption("no_device"): + pytest.skip("Skip device tests") + reader = pytestconfig.getoption("reader") capmanager = request.config.pluginmanager.getplugin("capturemanager") manager = DeviceManager(capmanager, reader)