SmallTag/tests/conftest.py

18 lines
433 B
Python
Raw Normal View History

2025-03-18 17:31:25 +01:00
#!/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)