-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1026 SVG/PNG: Contracted 'Functional Groups' and 'Salts and Solvents…
…' are rendered expanded when saved (#1154)
- Loading branch information
Showing
46 changed files
with
1,505 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
api/tests/integration/ref/rendering/expanded_contracted_rendering.py.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*** test png output *** | ||
*** test ket input *** | ||
contracted_fg_ss_ket.png rendering status: OK | ||
contracted_expanded_fg_ss_ket.png rendering status: OK | ||
expanded_fg_ss_ket.png rendering status: OK | ||
*** test mol input *** | ||
*** contracted_fg_ss_mol.png done *** | ||
contracted_fg_ss_mol.png rendering status: OK | ||
contracted_expanded_fg_ss_mol.png rendering status: OK | ||
expanded_fg_ss_mol.png rendering status: OK |
86 changes: 86 additions & 0 deletions
86
api/tests/integration/tests/rendering/expanded_contracted_rendering.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import errno | ||
import os | ||
import sys | ||
|
||
sys.path.append( | ||
os.path.normpath( | ||
os.path.join(os.path.abspath(__file__), "..", "..", "..", "common") | ||
) | ||
) | ||
from env_indigo import * # noqa | ||
from rendering import * | ||
|
||
if not os.path.exists(joinPathPy("out", __file__)): | ||
try: | ||
os.makedirs(joinPathPy("out", __file__)) | ||
except OSError as e: | ||
if e.errno != errno.EEXIST: | ||
raise | ||
|
||
indigo = Indigo() | ||
renderer = IndigoRenderer(indigo) | ||
|
||
print("*** test png output ***") | ||
|
||
print("*** test ket input ***") | ||
|
||
mol11 = indigo.loadMoleculeFromFile( | ||
joinPathPy("molecules/contracted_fg_ss.ket", __file__) | ||
) | ||
indigo.setOption("render-output-format", "png") | ||
renderer.renderToFile( | ||
mol11, joinPathPy("out/contracted_fg_ss_ket.png", __file__) | ||
) | ||
print(checkImageSimilarity("contracted_fg_ss_ket.png")) | ||
|
||
mol12 = indigo.loadMoleculeFromFile( | ||
joinPathPy("molecules/contracted_expanded_fg_ss.ket", __file__) | ||
) | ||
indigo.setOption("render-output-format", "png") | ||
renderer.renderToFile( | ||
mol12, joinPathPy("out/contracted_expanded_fg_ss_ket.png", __file__) | ||
) | ||
print(checkImageSimilarity("contracted_expanded_fg_ss_ket.png")) | ||
|
||
mol13 = indigo.loadMoleculeFromFile( | ||
joinPathPy("molecules/expanded_fg_ss.ket", __file__) | ||
) | ||
indigo.setOption("render-output-format", "png") | ||
renderer.renderToFile( | ||
mol13, joinPathPy("out/expanded_fg_ss_ket.png", __file__) | ||
) | ||
print(checkImageSimilarity("expanded_fg_ss_ket.png")) | ||
|
||
print("*** test mol input ***") | ||
|
||
mol14 = indigo.loadMoleculeFromFile( | ||
joinPathPy("molecules/contracted_fg_ss.mol", __file__) | ||
) | ||
indigo.setOption("render-output-format", "png") | ||
renderer.renderToFile( | ||
mol14, joinPathPy("out/contracted_fg_ss_mol.png", __file__) | ||
) | ||
print("*** contracted_fg_ss_mol.png done ***") | ||
print(checkImageSimilarity("contracted_fg_ss_mol.png")) | ||
|
||
mol15 = indigo.loadMoleculeFromFile( | ||
joinPathPy("molecules/contracted_expanded_fg_ss.mol", __file__) | ||
) | ||
indigo.setOption("render-output-format", "png") | ||
renderer.renderToFile( | ||
mol15, joinPathPy("out/contracted_expanded_fg_ss_mol.png", __file__) | ||
) | ||
print(checkImageSimilarity("contracted_expanded_fg_ss_mol.png")) | ||
|
||
mol16 = indigo.loadMoleculeFromFile( | ||
joinPathPy("molecules/expanded_fg_ss.mol", __file__) | ||
) | ||
indigo.setOption("render-output-format", "png") | ||
renderer.renderToFile( | ||
mol16, joinPathPy("out/expanded_fg_ss_mol.png", __file__) | ||
) | ||
print(checkImageSimilarity("expanded_fg_ss_mol.png")) | ||
|
||
if isIronPython(): | ||
renderer.Dispose() | ||
indigo.Dispose() |
Oops, something went wrong.