Skip to content

Commit

Permalink
add conftest file
Browse files Browse the repository at this point in the history
  • Loading branch information
chunyuma committed Dec 10, 2024
1 parent 20d19b4 commit 5906df0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import pytest

def pytest_addoption(parser):
parser.addoption(
"--runslow", action="store_true", default=False, help="Run slow tests"
)

def pytest_collection_modifyitems(config, items):
if not config.getoption("--runslow"):
# Skip slow tests unless --runslow is specified
skip_slow = pytest.mark.skip(reason="Need --runslow option to run")
for item in items:
if "slow" in item.keywords:
item.add_marker(skip_slow)

0 comments on commit 5906df0

Please sign in to comment.