Skip to content

Commit da607e8

Browse files
authored
Skip another failing Phonopy test in Windows after NumPy bumped to 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.
1 parent 653714e commit da607e8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/io/test_phonopy.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@
1010
from numpy.testing import assert_allclose, assert_array_equal
1111
from pytest import approx
1212

13-
from pymatgen.core import Element
13+
from pymatgen.core import Element, Structure
1414
from pymatgen.io.phonopy import (
1515
CompletePhononDos,
1616
PhononBandStructure,
1717
PhononBandStructureSymmLine,
18-
Structure,
1918
get_complete_ph_dos,
2019
get_displaced_structures,
2120
get_gruneisen_ph_bs_symm_line,
@@ -125,6 +124,10 @@ def test_structure_conversion(self):
125124
assert struct_pmg_round_trip.site_properties["magmom"] == struct_pmg.site_properties["magmom"]
126125

127126

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

159162

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

0 commit comments

Comments
 (0)