Expectation::toExecuteENVITask
Member of Expectation
idl
Expectation.toExecuteENVITask, $
/_expect_failureVerifies an expectation value to run the ENVI::Execute method. The expectation value must be an ENVI Task.
Examples
idl
; make sure to start ENVI
e = envi(/headless)
; create an ENVI task
task = ENVITask('SubsetRaster')
; open an input file
file = filepath('qb_boulder_msi', subdir = ['data'], $
root_dir = e.root_dir)
raster = e.openRaster(file)
; specify the task inputs
subRect = [raster.ncolumns / 4, raster.nrows / 4, $
raster.ncolumns * 3 / 4, raster.nrows * 3 / 4]
task.input_raster = raster
task.sub_rect = subRect
; run the task and verify that it executes without error
(it.expects(task)).toExecuteENVITaskKeywords
_expect_failure {#kw-_expect_failure}
optionalinputtype=BooleanIf the test fails for some reason, set this to force passing because we expected failure. This keyword is for internal use only.