Skip to content

Commit

Permalink
Update test to check oxidation_states_custom attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
AntObi committed Nov 9, 2023
1 parent ef2811b commit ad08aa1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions smact/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class TestSequenceFunctions(unittest.TestCase):
# ---------------- TOP-LEVEL ----------------

def test_Element_class_Pt(self):
Pt = smact.Element("Pt")
Pt = smact.Element(
"Pt",
)
self.assertEqual(Pt.name, "Platinum")
self.assertEqual(Pt.ionpot, 8.95883)
self.assertEqual(Pt.number, 78)
Expand All @@ -37,9 +39,10 @@ def test_ordered_elements(self):

def test_element_dictionary(self):
newlist = ["O", "Rb", "W"]
dictionary = smact.element_dictionary(newlist)
dictionary = smact.element_dictionary(newlist, TEST_OX_STATES)
self.assertEqual(dictionary["O"].crustal_abundance, 461000.0)
self.assertEqual(dictionary["Rb"].oxidation_states, [-1, 1])
self.assertEqual(dictionary["Rb"].oxidation_states_custom, [-1, 1])
self.assertEqual(dictionary["W"].name, "Tungsten")
self.assertTrue("Rn" in smact.element_dictionary())

Expand Down

0 comments on commit ad08aa1

Please sign in to comment.