From 47cafc458ae95f432915e2bb041864b643d09a6a Mon Sep 17 00:00:00 2001 From: Claire Simpson Date: Tue, 17 Dec 2024 13:23:03 -0800 Subject: [PATCH] removed redundant target_nodata specifications --- tests/test_geoprocessing.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/test_geoprocessing.py b/tests/test_geoprocessing.py index 612e5a50..1dd30d61 100644 --- a/tests/test_geoprocessing.py +++ b/tests/test_geoprocessing.py @@ -177,7 +177,6 @@ def test_reclassify_raster_missing_pixel_value(self): value_map = { test_value: 100, } - target_nodata = -1 with self.assertRaises( pygeoprocessing.ReclassificationMissingValuesError) as cm: pygeoprocessing.reclassify_raster( @@ -222,7 +221,6 @@ def test_reclassify_raster(self): value_map = { test_value: 100, } - target_nodata = -1 pygeoprocessing.reclassify_raster( (raster_path, 1), value_map, target_path, gdal.GDT_Float32, target_nodata, values_required=True) @@ -245,7 +243,6 @@ def test_reclassify_raster_no_raster_path_band(self): value_map = { test_value: 100, } - target_nodata = -1 # we expect a value error because we didn't pass a (path, band) # for the first argument with self.assertRaises(ValueError): @@ -267,7 +264,6 @@ def test_reclassify_raster_empty_value_map(self): empty_value_map = { } - target_nodata = -1 with self.assertRaises(ValueError): pygeoprocessing.reclassify_raster( (raster_path, 1), empty_value_map, target_path, @@ -2118,7 +2114,6 @@ def test_align_and_resize_raster_stack_int_with_vectors(self): pixel_a_matrix, target_nodata, base_a_path) pixel_b_matrix = numpy.ones((15, 15), numpy.int16) - target_nodata = -1 base_b_path = os.path.join(self.workspace_dir, 'base_b.tif') _array_to_raster( pixel_b_matrix, target_nodata, base_b_path) @@ -2225,7 +2220,6 @@ def test_align_and_resize_raster_stack_no_overlap(self): pixel_a_matrix, target_nodata, base_a_path, origin=[-10*30, 10*30]) pixel_b_matrix = numpy.ones((15, 15), numpy.int16) - target_nodata = -1 base_b_path = os.path.join(self.workspace_dir, 'base_b.tif') _array_to_raster(pixel_b_matrix, target_nodata, base_b_path) @@ -2268,7 +2262,6 @@ def test_align_and_resize_raster_stack_union(self): pixel_a_matrix, target_nodata, base_a_path, pixel_size=(30, -30)) pixel_b_matrix = numpy.ones((10, 10), numpy.int16) - target_nodata = -1 base_b_path = os.path.join(self.workspace_dir, 'base_b.tif') _array_to_raster( pixel_b_matrix, target_nodata, base_b_path, pixel_size=(60, -60)) @@ -2308,7 +2301,6 @@ def test_align_and_resize_raster_stack_bb(self): pixel_a_matrix, target_nodata, base_a_path, pixel_size=(30, -30)) pixel_b_matrix = numpy.ones((10, 10), numpy.int16) - target_nodata = -1 base_b_path = os.path.join(self.workspace_dir, 'base_b.tif') _array_to_raster( pixel_b_matrix, target_nodata, base_b_path, pixel_size=(30, -30))