Skip to content

Commit

Permalink
chore: add test for atom_params rep
Browse files Browse the repository at this point in the history
  • Loading branch information
r3zu committed Mar 3, 2024
1 parent eeac137 commit daca3fc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_get_atom_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from xtal2txt.core import TextRep
import os

THIS_DIR = os.path.dirname(os.path.abspath(__file__))

srtio3_p1 = TextRep.from_input(os.path.join(THIS_DIR, "data", "SrTiO3_p1.cif"))


def test_get_atom_params() -> None:
expected_wo_params = "Sr Ti O O O"
expected_w_params = "Sr Ti O O O 90 90 90 3.91 3.91 3.91"
assert srtio3_p1.get_atom_params() == expected_wo_params
assert srtio3_p1.get_atom_params(lattice_params=True) == expected_w_params

0 comments on commit daca3fc

Please sign in to comment.