Skip to content

Commit

Permalink
#1254 SMARTS with component-level grouping saved without '()'
Browse files Browse the repository at this point in the history
 Fix UTs
  • Loading branch information
AliaksandrDziarkach committed Sep 12, 2023
1 parent ca4d325 commit c435b84
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions api/tests/integration/tests/rsmiles/rsmiles_smarts.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@

smarts_in = "([#8:1].[#6:2])>>([#8:1].[#6:2])"
rxn1 = indigo.loadReactionSmarts(smarts_in)
assert rxn1.countReactants() == 1
assert rxn1.countProducts() == 1
print("SMARTS component-level grouping load ok")
if rxn1.countReactants() == 1 and rxn1.countProducts() == 1:
print("SMARTS component-level grouping load ok")
else:
print("SMARTS component-level grouping load failed")
print("rxn1.countReactants()=%s" % rxn1.countReactants())
print("rxn1.countProducts()=%s" % rxn1.countProducts())
smarts_out = rxn1.smarts()
assert smarts_in == smarts_out
print("SMARTS component-level grouping save ok")
if smarts_in == smarts_out:
print("SMARTS component-level grouping save ok")
else:
print("SMARTS component-level grouping save failed")
print("smart_in=%s" % smarts_in)
print("smart_ou=%s" % smarts_out)

0 comments on commit c435b84

Please sign in to comment.