Skip to content

Commit 9bb6753

Browse files
committed
Tests: common.remove_numeric_parentheses()
f tst remove paranthesis
1 parent c6f7589 commit 9bb6753

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tests/test_common.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,14 @@ def test_get_o2_stoichiometry():
213213
assert common.get_o2_stoichiometry(smiles='CCCCCC') == 9.5 # 6 CO2 + 7 H2O
214214
assert common.get_o2_stoichiometry(smiles='CCO') == 3 # 2 CO2 + 3 H2O - O
215215
assert common.get_o2_stoichiometry(smiles='NCC') == 7.5 / 2 # 2 CO2 + 3.5 H2O
216+
217+
218+
def test_remove_numeric_parentheses():
219+
"""Test the remove_numeric_parentheses() function"""
220+
assert common.remove_numeric_parentheses('C2H5(2)') == 'C2H5'
221+
assert common.remove_numeric_parentheses('C2H5') == 'C2H5'
222+
assert common.remove_numeric_parentheses('CH2(S)') == 'CH2(S)'
223+
assert common.remove_numeric_parentheses('C2H5(547)') == 'C2H5'
224+
assert common.remove_numeric_parentheses('C2H5(547)H') == 'C2H5(547)H'
225+
assert common.remove_numeric_parentheses('HNO(T)(21)') == 'HNO(T)'
226+

0 commit comments

Comments
 (0)