diff --git a/tests/analysis/test_piezo_sensitivity.py b/tests/analysis/test_piezo_sensitivity.py index eafaaddc6b4..810f2d3e38e 100644 --- a/tests/analysis/test_piezo_sensitivity.py +++ b/tests/analysis/test_piezo_sensitivity.py @@ -3,6 +3,7 @@ from __future__ import annotations import pickle +import sys import numpy as np import pytest @@ -257,6 +258,7 @@ def test_get_piezo(self): piezo = get_piezo(self.BEC, self.IST, self.FCM) assert_allclose(piezo, self.piezo, atol=1e-5) + @pytest.mark.skipif(sys.platform == "win32" and int(np.__version__[0]) >= 2, reason="See https://github.com/conda-forge/phonopy-feedstock/pull/158#issuecomment-2227506701") def test_rand_piezo(self): pytest.importorskip("phonopy") rand_BEC, rand_IST, rand_FCM, _piezo = rand_piezo( diff --git a/tests/core/test_structure.py b/tests/core/test_structure.py index 2e50eb6d948..dacc2e13a7b 100644 --- a/tests/core/test_structure.py +++ b/tests/core/test_structure.py @@ -1680,6 +1680,7 @@ def test_calculate_ase(self): assert not hasattr(calculator, "dynamics") assert self.cu_structure == struct_copy, "original structure was modified" + @pytest.mark.skipif(int(np.__version__[0]) >= 2, reason="chgnet is not built against NumPy 2.0") def test_relax_chgnet(self): pytest.importorskip("chgnet") struct_copy = self.cu_structure.copy() @@ -1703,6 +1704,7 @@ def test_relax_chgnet(self): assert custom_relaxed.calc.results.get("energy") == approx(-6.0151076, abs=1e-4) assert custom_relaxed.volume == approx(40.044794644, abs=1e-4) + @pytest.mark.skipif(int(np.__version__[0]) >= 2, reason="chgnet is not built against NumPy 2.0") def test_calculate_chgnet(self): pytest.importorskip("chgnet") struct = self.get_structure("Si") diff --git a/tests/io/test_phonopy.py b/tests/io/test_phonopy.py index f12cce1f0a0..874580f7660 100644 --- a/tests/io/test_phonopy.py +++ b/tests/io/test_phonopy.py @@ -1,6 +1,7 @@ from __future__ import annotations import os +import sys from pathlib import Path from unittest import TestCase @@ -167,6 +168,7 @@ def setUp(self) -> None: self.supercell_matrix = np.eye(3) * 2 self.force_constants = parse_FORCE_CONSTANTS(fc_file) + @pytest.mark.skipif(sys.platform == "win32" and int(np.__version__[0]) >= 2, reason="See https://github.com/conda-forge/phonopy-feedstock/pull/158#issuecomment-2227506701") def test_get_phonon_dos_from_fc(self): dos = get_phonon_dos_from_fc( self.structure, diff --git a/tests/io/vasp/test_optics.py b/tests/io/vasp/test_optics.py index 3a2caf7a94a..7ddd4422a47 100644 --- a/tests/io/vasp/test_optics.py +++ b/tests/io/vasp/test_optics.py @@ -1,5 +1,7 @@ from __future__ import annotations +import sys + import numpy as np import pytest import scipy.special @@ -51,6 +53,7 @@ def test_optics(self): assert len(x_val) == len(y_val) == len(text) +@pytest.mark.skipif(sys.platform == "win32" and int(np.__version__[0]) >= 2, reason="Fails on Windows with numpy > 2.0.0, awaiting https://github.com/scipy/scipy/issues/21052 resolution") def test_delta_func(): x = np.array([0, 1, 2, 3, 4, 5])