Skip to content

Commit

Permalink
raise error to see what it looks like on each test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
emlys committed May 20, 2024
1 parent 4caa2d9 commit 77d9ac3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_geoprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit 77d9ac3

Please sign in to comment.