Skip to content

Commit

Permalink
Skip another failing Phonopy test in Windows after NumPy bumped to …
Browse files Browse the repository at this point in the history
…2 in CI (materialsproject#4224)

* skip another test

* fix import

* update reason

* what? looks like the latest monty doesn't pack reverse readline fix?

* Revert "what? looks like the latest monty doesn't pack reverse readline fix?"

This reverts commit b891244.
  • Loading branch information
DanielYang59 authored Dec 12, 2024
1 parent 653714e commit da607e8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/io/test_phonopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
from numpy.testing import assert_allclose, assert_array_equal
from pytest import approx

from pymatgen.core import Element
from pymatgen.core import Element, Structure
from pymatgen.io.phonopy import (
CompletePhononDos,
PhononBandStructure,
PhononBandStructureSymmLine,
Structure,
get_complete_ph_dos,
get_displaced_structures,
get_gruneisen_ph_bs_symm_line,
Expand Down Expand Up @@ -125,6 +124,10 @@ def test_structure_conversion(self):
assert struct_pmg_round_trip.site_properties["magmom"] == struct_pmg.site_properties["magmom"]


@pytest.mark.skipif(
platform.system() == "Windows" and int(np.__version__[0]) >= 2,
reason="cannot run NP2 on windows, see PR 4224",
)
@pytest.mark.skipif(Phonopy is None, reason="Phonopy not present")
class TestGetDisplacedStructures(PymatgenTest):
def test_get_displaced_structures(self):
Expand Down Expand Up @@ -157,11 +160,11 @@ def test_get_displaced_structures(self):
assert os.path.isfile("test.yaml")


@pytest.mark.skipif(Phonopy is None, reason="Phonopy not present")
@pytest.mark.skipif(
platform.system() == "Windows" and int(np.__version__[0]) >= 2,
reason="See https://github.com/conda-forge/phonopy-feedstock/pull/158#issuecomment-2227506701",
reason="cannot run NP2 on windows, see PR 4224",
)
@pytest.mark.skipif(Phonopy is None, reason="Phonopy not present")
class TestPhonopyFromForceConstants(TestCase):
def setUp(self) -> None:
test_path = Path(TEST_DIR)
Expand Down

0 comments on commit da607e8

Please sign in to comment.