Skip to content

Commit

Permalink
skip if no enumlib
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielYang59 committed Jan 29, 2025
1 parent 56b830f commit 38aea5e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/analysis/magnetism/test_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

TEST_DIR = f"{TEST_FILES_DIR}/analysis/magnetic_orderings"

enum_cmd = which("enum.x") or which("multienum.x")
makestr_cmd = which("makestr.x") or which("makeStr.x") or which("makeStr.py")
enumlib_present = enum_cmd and makestr_cmd
ENUM_CMD = which("enum.x") or which("multienum.x")
MAKESTR_CMD = which("makestr.x") or which("makeStr.x") or which("makeStr.py")
ENUMLIB_PRESENT = ENUM_CMD and MAKESTR_CMD


class TestCollinearMagneticStructureAnalyzer(TestCase):
Expand Down Expand Up @@ -259,8 +259,8 @@ def test_missing_spin(self):
assert msa.structure.site_properties["magmom"] == [-5, 5, 0, 0]


@pytest.mark.skipif(not ENUMLIB_PRESENT, reason="enumlib not present")
class TestMagneticStructureEnumerator:
@pytest.mark.skipif(not enumlib_present, reason="enumlib not present")
def test_ordering_enumeration(self):
# simple AFM
structure = Structure.from_file(f"{TEST_DIR}/LaMnO3.json")
Expand Down

0 comments on commit 38aea5e

Please sign in to comment.