basics and tests done.
This commit is contained in:
@@ -1,10 +1,29 @@
|
||||
"""
|
||||
Dummy conftest.py for cristallina.
|
||||
conftest.py for cristallina.
|
||||
|
||||
If you don't know what this is for, just leave it empty.
|
||||
Read more about conftest.py under:
|
||||
- https://docs.pytest.org/en/stable/fixture.html
|
||||
- https://docs.pytest.org/en/stable/writing_plugins.html
|
||||
"""
|
||||
|
||||
# import pytest
|
||||
import pytest
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
parser.addoption(
|
||||
"--runregression", action="store_true", default=False, help="run slow regression tests"
|
||||
)
|
||||
|
||||
|
||||
def pytest_configure(config):
|
||||
config.addinivalue_line("markers", "regression: mark test as a slow regression test to run")
|
||||
|
||||
|
||||
def pytest_collection_modifyitems(config, items):
|
||||
if config.getoption("--runregression"):
|
||||
# --runregression given in cli: do not skip slow tests
|
||||
return
|
||||
skip_regression = pytest.mark.skip(reason="need --runregression option to run")
|
||||
for item in items:
|
||||
if "regression" in item.keywords:
|
||||
item.add_marker(skip_regression)
|
||||
|
||||
Reference in New Issue
Block a user