@@ -220,7 +220,7 @@ def test_create_browse_imagery_with_mocks(
220220 src_crs = da_mock .rio .crs ,
221221 dst_transform = target_transform ,
222222 dst_crs = CRS .from_string ('EPSG:4326' ),
223- dst_nodata = 255 , # NODATA_IDX
223+ dst_nodata = 255 , # NODATA_IDX
224224 resampling = Resampling .nearest ,
225225 ),
226226 ]
@@ -305,19 +305,18 @@ def test_convert_singleband_to_raster_with_colormap(self):
305305 dtype = 'uint8' ,
306306 )
307307 expected_palette = {
308- 0 : (255 , 0 , 0 , 255 ), # red
309- 1 : (255 , 255 , 0 , 255 ), # yellow
310- 2 : (0 , 255 , 0 , 255 ), # green
311- 3 : (0 , 0 , 255 , 255 ), # blue
312- 4 : (0 , 0 , 0 , 0 ), # alpha
308+ 0 : (255 , 0 , 0 , 255 ), # red
309+ 1 : (255 , 255 , 0 , 255 ), # yellow
310+ 2 : (0 , 255 , 0 , 255 ), # green
311+ 3 : (0 , 0 , 255 , 255 ), # blue
312+ 4 : (0 , 0 , 0 , 0 ), # alpha
313313 }
314314 # Read down: red, yellow, green, blue
315315 image_palette = convert_colormap_to_palette (self .colormap )
316316 actual_raster , actual_palette = convert_singleband_to_raster (ds , image_palette )
317317 assert_array_equal (expected_raster , actual_raster , strict = True )
318318 assert_equal (expected_palette , actual_palette )
319319
320-
321320 def test_convert_singleband_to_raster_with_colormap_and_bad_data (self ):
322321 data_array = np .array (self .data , dtype = 'float' )
323322 data_array [0 , 0 ] = np .nan
@@ -337,11 +336,11 @@ def test_convert_singleband_to_raster_with_colormap_and_bad_data(self):
337336 dtype = 'uint8' ,
338337 )
339338 expected_palette = {
340- 0 : (255 , 0 , 0 , 255 ), # red
341- 1 : (255 , 255 , 0 , 255 ), # yellow
342- 2 : (0 , 255 , 0 , 255 ), # green
343- 3 : (0 , 0 , 255 , 255 ), # blue
344- 4 : (10 , 20 , 30 , 40 ), # nv
339+ 0 : (255 , 0 , 0 , 255 ), # red
340+ 1 : (255 , 255 , 0 , 255 ), # yellow
341+ 2 : (0 , 255 , 0 , 255 ), # green
342+ 3 : (0 , 0 , 255 , 255 ), # blue
343+ 4 : (10 , 20 , 30 , 40 ), # nv
345344 }
346345
347346 colormap = {** self .colormap , 'nv' : nv_color }
0 commit comments