Skip to content
Snippets Groups Projects
Commit 15e34974 authored by Julien Michel's avatar Julien Michel
Browse files

TEST: Adding test to ensure non-regression on bugfix #1498

parent 02adff08
No related branches found
No related tags found
No related merge requests found
import otbApplication as otb
# TO RUN WITH PYTHON3
# try:
# unicode = unicode
# except NameError:
# # 'unicode' is undefined, must be Python 3
# str = str
# unicode = str
# bytes = bytes
# basestring = (str,bytes)
# else:
# # 'unicode' exists, must be Python 2
# str = str
# unicode = unicode
# bytes = str
# basestring = basestring
# This test checks that UpdateOutputInformation() has been called on output image pointers when connecting pipeline in-memory
# This code snippet has been used to reproduce bug #1498
if __name__ == '__main__':
inimage = sys.argv[2]
outimage = sys.argv[3]
ext1 = otb.Registry.CreateApplication("ExtractROI")
ext2 = otb.Registry.CreateApplication("ExtractROI")
ext1.SetParameterString('in',inimage)
ext1.Execute()
ext1.UpdateParameters()
ext2.SetParameterInputImage('in',ext2.GetParameterOutputImage('out'))
ext2.UpdateParameters()
ext2.SetParameterStringList('cl',['Channel1'])
ext2.SetParameterString("out",outimage)
ext2.ExecuteAndWriteOutput()
......@@ -135,3 +135,11 @@ add_test( NAME pyTvConnectApplications
PythonConnectApplications
${OTB_DATA_ROOT}/Input/poupees.tif
${TEMP}/pyTvConnectApplicationsOutput.tif)
add_test( NAME pyTvBug1498
COMMAND ${TEST_DRIVER} Execute
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/PythonTestDriver.py
Bug823
${OTB_DATA_ROOT}/Input/poupees.tif
${TEMP}/Bu1498-output.tif)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment