def test_formula_items(self): f = Formula({Atom.H: 12, Atom.C: 6, Atom.O: 6}) self.assertEqual(dict(f.items()), { Atom.C: 6, Atom.H: 12, Atom.O: 6 })
def test_formula_items(self): f = Formula({Atom('H'): 12, Atom('C'): 6, Atom('O'): 6}) self.assertEqual(dict(f.items()), { Atom('C'): 6, Atom('H'): 12, Atom('O'): 6 })