예제 #1
0
 def test_given_parity():
     """Test a given parity."""
     molecule = Molecule([AtomSpec('C', 4, parity=False)], [])
     assert molecule.atom_parity(0) == Parity(False)
예제 #2
0
 def test_atom_parity_given_invalid():
     """Test that invalid atoms raise error when calling parity."""
     carb = AtomSpec(6, 4)
     molecule = Molecule([carb], [])
     with pytest.raises(ValueError):
         molecule.atom_parity(1)
예제 #3
0
 def test_parity():
     """Test the parity."""
     molecule = Molecule([AtomSpec('C', 4)], [])
     assert molecule.atom_parity(0) is None