Skip to content

Commit

Permalink
Added test for 'gdal_rasterize -init 0'
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus authored and nyalldawson committed Jan 17, 2019
1 parent 36c821d commit 2488f71
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/plugins/processing/tests/GdalAlgorithmsTest.py
Expand Up @@ -2012,6 +2012,16 @@ def testRasterize(self):
'-l polys2 -a id -ts 0.0 0.0 -a_nodata 9999.0 -ot Float32 -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])
# with "0" INIT value
self.assertEqual(
alg.getConsoleCommands({'INPUT': source,
'INIT': 0,
'FIELD': 'id',
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdal_rasterize',
'-l polys2 -a id -ts 0.0 0.0 -init 0.0 -ot Float32 -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])
# with "0" NODATA value
self.assertEqual(
alg.getConsoleCommands({'INPUT': source,
Expand Down

0 comments on commit 2488f71

Please sign in to comment.