Skip to content

Commit 25be2e1

Browse files
reverted logic from Olivier to remove mdsplus backend testing when not available
1 parent 2e00123 commit 25be2e1

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/test_with_pytest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Run tests
3535
run: |
3636
source venv/bin/activate
37-
python -m pytest -n=auto --memory --ascii --hdf5 --cov=imas --cov-report=term-missing --cov-report=xml:coverage.xml --cov-report=html:htmlcov --junit-xml=junit.xml
37+
python -m pytest -n=auto --cov=imas --cov-report=term-missing --cov-report=xml:coverage.xml --cov-report=html:htmlcov --junit-xml=junit.xml
3838
3939
- name: Upload coverage report ${{ matrix.python-version }}
4040
uses: actions/upload-artifact@v4

conftest.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,13 @@ def pytest_addoption(parser):
5858
"hdf5": HDF5_BACKEND,
5959
"mdsplus": MDSPLUS_BACKEND,
6060
}
61-
61+
try:
62+
from imas.db_entry import DBEntry
63+
from imas_core.exception import ImasCoreBackendException
64+
DBEntry("imas:mdsplus?path=dummy","r")
65+
except ImasCoreBackendException as iex:
66+
if "not available" in str(iex.message):
67+
_BACKENDS.pop("mdsplus")
6268

6369
try:
6470
import pytest_xdist

0 commit comments

Comments
 (0)