Skip to content

Commit

Permalink
#2313 - Indigo functions doesn't work if ambiguous monomer present o…
Browse files Browse the repository at this point in the history
…n the canvas (#2689)
  • Loading branch information
AliaksandrDziarkach authored Dec 17, 2024
1 parent 5e3c031 commit 4e626c4
Show file tree
Hide file tree
Showing 5 changed files with 1,110 additions and 7 deletions.
6 changes: 4 additions & 2 deletions api/tests/integration/ref/formats/ket_to_ket.py.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
*** KET to KET ***
images.ket:SUCCEED
monomer_shape.ket molecule: SUCCEED
monomer_shape.ket molecule: SUCCEED
ambiguous_monomer.ket doc: SUCCEED
ambiguous_monomer.ket mol: SUCCEED
monomer_shape.ket doc: SUCCEED
monomer_shape.ket mol: SUCCEED
9 changes: 5 additions & 4 deletions api/tests/integration/tests/formats/ket_to_ket.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,19 @@ def check_res(filename, format, ket_ref, ket):
indigo.setOption("json-use-native-precision", True)
files = [
"monomer_shape",
"ambiguous_monomer",
]
formats = {
"mol": indigo.loadMolecule,
"doc": indigo.loadKetDocument,
"mol": indigo.loadMolecule,
}
for filename in sorted(files):
for format, loader in formats.items():
for format in sorted(formats.keys()):
file_path = os.path.join(ref_path, filename)
with open("{}_{}.ket".format(file_path, format), "r") as file:
ket_ref = file.read()
mol = loader(ket_ref)
mol = formats[format](ket_ref)
# with open("{}_{}.ket".format(file_path, format), "w") as file:
# file.write(mol.json())
ket = mol.json()
check_res(filename, "molecule", ket_ref, ket)
check_res(filename, format, ket_ref, ket)
Loading

0 comments on commit 4e626c4

Please sign in to comment.