Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: materialsproject/pymatgen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6b4479751d90411186b92309f12802c32758a15e
Choose a base ref
...
head repository: materialsproject/pymatgen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d41a039bb16a547662b48f6dd245d203ef45df71
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Dec 20, 2024

  1. Copy the full SHA
    d41a039 View commit details
Showing with 7 additions and 4 deletions.
  1. +7 −4 tests/io/test_phonopy.py
11 changes: 7 additions & 4 deletions tests/io/test_phonopy.py
Original file line number Diff line number Diff line change
@@ -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,
@@ -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):
@@ -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)