Skip to content

Commit 04b3035

Browse files
committed
update test
1 parent c066f09 commit 04b3035

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/core/test_structure.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,11 @@ def test_to_from_ase_atoms(self):
964964
assert isinstance(atoms, Atoms)
965965
assert len(atoms) == len(self.struct)
966966

967-
assert AseAtomsAdaptor.get_structure(atoms) == self.struct
967+
structure = AseAtomsAdaptor.get_structure(atoms)
968+
assert structure == self.struct
969+
970+
# Ensure PBC is `bool` type (not `np.bool_`) and JSON serializable
971+
assert "pymatgen.core.structure" in structure.to(fmt="json")
968972

969973
assert IStructure.from_ase_atoms(atoms) == self.struct
970974
assert type(IStructure.from_ase_atoms(atoms)) is IStructure

0 commit comments

Comments
 (0)