Skip to content

Commit

Permalink
Added test for 'gdal_rasterize -init 0'
Browse files Browse the repository at this point in the history
(cherry picked from commit 2488f71)
  • Loading branch information
suricactus authored and nyalldawson committed Jan 18, 2019
1 parent 97dcdc1 commit 1639c74
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/plugins/processing/tests/GdalAlgorithmsTest.py
Original file line number Diff line number Diff line change
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 1639c74

Please sign in to comment.