1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-11-03 12:43:55 +01:00

Add config file for pytest

This commit is contained in:
q-posev 2023-05-25 18:52:52 +02:00
parent 326686e44c
commit 472671190c
No known key found for this signature in database

17
python/test/conftest.py Normal file
View File

@ -0,0 +1,17 @@
# content of conftest.py
import pytest
def pytest_addoption(parser):
parser.addoption(
"--all", action="store_true", help="Run all back-ends"
)
def pytest_generate_tests(metafunc):
if "backend" in metafunc.fixturenames:
if metafunc.config.getoption("all"):
backends = ['hdf5', 'text']
else:
backends = ['text']
metafunc.parametrize("backend", backends)