コード例 #1
0
ファイル: test_molecule.py プロジェクト: thesketh/oxmol
 def test_given_parity():
     """Test a given parity."""
     molecule = Molecule([AtomSpec('C', 4, parity=False)], [])
     assert molecule.atom_parity(0) == Parity(False)
コード例 #2
0
ファイル: test_molecule.py プロジェクト: thesketh/oxmol
 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
ファイル: test_molecule.py プロジェクト: thesketh/oxmol
 def test_parity():
     """Test the parity."""
     molecule = Molecule([AtomSpec('C', 4)], [])
     assert molecule.atom_parity(0) is None