Skip to content

Commit

Permalink
Merge pull request #152 from ubermag/filter_tests
Browse files Browse the repository at this point in the history
Filter out unsupported tests
  • Loading branch information
lang-m authored Mar 1, 2024
2 parents 18c230f + 10870e6 commit 9249157
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_relax_check_for_energy", "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 9249157

Please sign in to comment.