def test_given_parity(): """Test a given parity.""" molecule = Molecule([AtomSpec('C', 4, parity=False)], []) assert molecule.atom_parity(0) == Parity(False)
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)
def test_parity(): """Test the parity.""" molecule = Molecule([AtomSpec('C', 4)], []) assert molecule.atom_parity(0) is None