From 77d9ac3cb6982e9d11b32913b9e00e263db7baa6 Mon Sep 17 00:00:00 2001 From: Emily Soth Date: Mon, 20 May 2024 11:51:20 -0700 Subject: [PATCH] raise error to see what it looks like on each test environment --- tests/test_geoprocessing.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_geoprocessing.py b/tests/test_geoprocessing.py index 14c9675a..d5d1360f 100644 --- a/tests/test_geoprocessing.py +++ b/tests/test_geoprocessing.py @@ -2788,13 +2788,14 @@ def test_create_raster_from_vector_extents_invalid_pixeltype(self): self.workspace_dir, 'target_raster.tif') target_nodata = -1 target_pixel_type = gdal.GDT_Int16 - with self.assertRaises(ValueError) as cm: + pygeoprocessing.create_raster_from_vector_extents( + source_vector_path, target_raster_path, _DEFAULT_PIXEL_SIZE, + target_nodata, target_pixel_type) + with self.assertRaises(Exception) as cm: pygeoprocessing.create_raster_from_vector_extents( source_vector_path, target_raster_path, _DEFAULT_PIXEL_SIZE, target_nodata, target_pixel_type) - self.assertIn( - 'Invalid target type, should be a gdal.GDT_* type', - str(cm.exception)) + self.assertIn('Invalid value for GDALDataType', str(cm.exception)) def test_create_raster_from_vector_extents_odd_pixel_shapes(self): """PGP.geoprocessing: create raster vector ext. w/ odd pixel size."""