Skip to content

Commit

Permalink
Tests: common.remove_numeric_parentheses()
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Oct 28, 2024
1 parent 3b6dc35 commit d676a05
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,13 @@ def test_get_o2_stoichiometry():
assert common.get_o2_stoichiometry(smiles='CCCCCC') == 9.5 # 6 CO2 + 7 H2O
assert common.get_o2_stoichiometry(smiles='CCO') == 3 # 2 CO2 + 3 H2O - O
assert common.get_o2_stoichiometry(smiles='NCC') == 7.5 / 2 # 2 CO2 + 3.5 H2O


def test_remove_numeric_parentheses():
"""Test the remove_numeric_parentheses() function"""
assert common.remove_numeric_parentheses('C2H5(2)') == 'C2H5'
assert common.remove_numeric_parentheses('C2H5') == 'C2H5'
assert common.remove_numeric_parentheses('CH2(S)') == 'CH2(S)'
assert common.remove_numeric_parentheses('C2H5(547)') == 'C2H5'
assert common.remove_numeric_parentheses('C2H5(547)H') == 'C2H5(547)H'

0 comments on commit d676a05

Please sign in to comment.