SmallTag/tests/conftest.py
2025-03-18 17:31:25 +01:00

17 lines
433 B
Python

#!/usr/bin/python3
import pytest
def pytest_addoption(parser):
parser.addoption(
"--fast", action="store_true", help="Run only fast tests")
def pytest_collection_modifyitems(config, items):
if config.getoption("--fast"):
skip_slow = pytest.mark.skip(reason="Runs only without --fast option.")
for item in items:
if "slow" in item.keywords:
item.add_marker(skip_slow)