mirror of
https://github.com/trailofbits/buttercup
synced 2026-06-21 14:11:39 +00:00
20 lines
654 B
Python
20 lines
654 B
Python
import pytest
|
|
|
|
|
|
def pytest_addoption(parser):
|
|
parser.addoption("--runintegration", action="store_true", default=False, help="run integration tests")
|
|
|
|
|
|
def pytest_configure(config):
|
|
config.addinivalue_line("markers", "integration: mark test as an integration test")
|
|
|
|
|
|
def pytest_collection_modifyitems(config, items):
|
|
if config.getoption("--runintegration"):
|
|
# --runintegration given in cli: do not skip integration tests
|
|
return
|
|
skip_integration = pytest.mark.skip(reason="need --runintegration option to run")
|
|
for item in items:
|
|
if "integration" in item.keywords:
|
|
item.add_marker(skip_integration)
|