Skip to content

Commit

Permalink
Test for correct setting of hexagonal attribute when instantiating fr…
Browse files Browse the repository at this point in the history
…om int number.
  • Loading branch information
kaueltzen committed Jun 5, 2024
1 parent ebe1246 commit 561dfef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/symmetry/test_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@ def test_subgroup_supergroup(self):
assert SpaceGroup("Pma2").is_subgroup(SpaceGroup("Pccm"))
assert not SpaceGroup.from_int_number(229).is_subgroup(SpaceGroup.from_int_number(230))

def test_hexagonal(self):
for num in (146, 148, 155, 160, 161, 166, 167):
sg = SpaceGroup.from_int_number(num, hexagonal=False)
assert sg.hexagonal is False
sg = SpaceGroup.from_int_number(num, hexagonal=True)
assert sg.hexagonal is True

def test_string(self):
sg = SpaceGroup("R-3c")
assert sg.to_latex_string() == r"R$\overline{3}$c"
Expand Down

0 comments on commit 561dfef

Please sign in to comment.