basics and tests done.

This commit is contained in:
2022-07-12 17:15:28 +02:00
parent 2b077152f4
commit b5a54de804
6 changed files with 433 additions and 3 deletions

View File

@@ -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)