diff --git a/icepyx/core/spatial.py b/icepyx/core/spatial.py index 7806fdb1c..75bbfb325 100644 --- a/icepyx/core/spatial.py +++ b/icepyx/core/spatial.py @@ -79,7 +79,7 @@ def geodataframe( if isinstance(spatial_extent, str): raise TypeError( - f"Expected list of floats or Polygon, received {spatial_extent=}" + f"Expected list of floats, list of tuples of floats, or Polygon, received {spatial_extent=}" ) if isinstance(spatial_extent, Polygon): diff --git a/icepyx/tests/unit/test_spatial.py b/icepyx/tests/unit/test_spatial.py index 690503c78..254154a19 100644 --- a/icepyx/tests/unit/test_spatial.py +++ b/icepyx/tests/unit/test_spatial.py @@ -437,6 +437,13 @@ def test_gdf_raises_error_bounding_box_file(): spat.geodataframe("bounding_box", "/fake/file/somewhere/polygon.shp", file=True) +def test_gdf_raises_error_string_file_false(): + with pytest.raises(TypeError): + spat.geodataframe( + "bounding_box", "/fake/file/somewhere/polygon.shp", file=False + ) + + # Potential tests to include once multipolygon and complex polygons are handled # def test_gdf_from_strpoly_one_simple():