Skip to content

Commit

Permalink
test chemsys_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed Oct 15, 2020
1 parent 6dc87a9 commit 9896e2a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/emmet-builders/test_utils.py
@@ -1,5 +1,5 @@
from itertools import combinations, chain
from emmet.builders.utils import maximal_spanning_non_intersecting_subsets
from emmet.builders.utils import maximal_spanning_non_intersecting_subsets, chemsys_permutations


def test_maximal_spanning_non_intersecting_subsets():
Expand All @@ -15,3 +15,9 @@ def test_maximal_spanning_non_intersecting_subsets():
assert maximal_spanning_non_intersecting_subsets(
[{"A", "B"}, {"A", "B", "C"}, {"D"}]
) == {frozenset(d) for d in [{"A", "B"}, {"C"}, {"D"}]}


def test_chemsys_permutations(test_dir):
assert len(chemsys_permutations("Sr")) == 1
assert len(chemsys_permutations("Sr-Hf")) == 3
assert len(chemsys_permutations("Sr-Hf-O")) == 7

0 comments on commit 9896e2a

Please sign in to comment.