Skip to content

Commit

Permalink
Filter out unsupported tests
Browse files Browse the repository at this point in the history
ubermag/micromagnetictests#47 introduces additional tests for the
relax driver which is not supported in oommf.
  • Loading branch information
kzqureshi committed Feb 27, 2024
1 parent 41d36ac commit 41bd3bf
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions oommfc/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,20 @@

import oommfc as oc

not_supported_by_oommf = ["test_check_for_energy_and_dynamics", "test_relaxdriver"]


@pytest.fixture(scope="module")
def calculator():
return oc


@pytest.fixture(autouse=True)
def skip_unsupported_or_missing(request):
requesting_test_function = (
f"{request.cls.__name__}.{request.function.__name__}"
if request.cls
else request.function.__name__
)
if requesting_test_function in not_supported_by_oommf:
pytest.skip("Not supported by OOMMF.")

0 comments on commit 41bd3bf

Please sign in to comment.