Commit 0049cd73 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

Merge branch '2200_ram_parameter_python' into 'develop'

Treat Parameter_RAM as an integer parameter in SetParameterValue (Swig Wrapper)

See merge request !826
parents 8f8665bf 1a964175
Pipeline #8016 passed with stages
in 19 minutes and 58 seconds
......@@ -656,8 +656,7 @@ class ApplicationProxy(object):
def SetParameterValue(self, paramKey, value):
paramType = self.GetParameterType(paramKey)
if paramType in [ParameterType_RAM,
ParameterType_String, ParameterType_InputFilename,
if paramType in [ParameterType_String, ParameterType_InputFilename,
ParameterType_OutputImage, ParameterType_OutputVectorData,
ParameterType_OutputFilename,
ParameterType_Directory, ParameterType_InputImage,
......@@ -667,7 +666,7 @@ class ApplicationProxy(object):
ParameterType_InputFilenameList, ParameterType_StringList,
ParameterType_ListView, ParameterType_Field, ParameterType_Band]:
return self.SetParameterStringList(paramKey, value)
elif paramType in [ParameterType_Int, ParameterType_Radius]:
elif paramType in [ParameterType_Int, ParameterType_Radius, ParameterType_RAM]:
return self.SetParameterInt(paramKey, value)
elif paramType in [ParameterType_Float]:
return self.SetParameterFloat(paramKey, value)
......
......@@ -107,11 +107,11 @@ def test(otb, argv):
cm_assert(app.GetParameterFloat('elev.default'), -2.5)
#18 - parameter ram get
app.SetParameterString('opt.ram', '256')
app.SetParameterInt('opt.ram', 256)
cm_assert(256, app.OPT.RAM)
#19 - parameter ram set
app.OPT.RAM = '512'
app.OPT.RAM = 512
cm_assert(app.GetParameterInt('opt.ram'), 512)
#20 - parameter bool set
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment