Skip to content

Commit

Permalink
Merge branch 'main' into gs/inverted-bounds-point
Browse files Browse the repository at this point in the history
  • Loading branch information
georgespill authored Jul 26, 2024
2 parents cc93e4f + fbdaff8 commit c20142e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions tests/test_cmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def test_apply_discrete_cmap():
assert colormap.apply_cmap(data, cm)

# Test with negative value
data = data.astype("int16")
cm = {-100: (255, 255, 255, 255), 1: (0, 0, 0, 255), 256: (255, 255, 255, 255)}
data[0, 5:, 5:] = -100
d, m = colormap.apply_cmap(data, cm)
Expand Down
5 changes: 1 addition & 4 deletions tests/test_io_xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ def test_xarray_reader():
bounds = tms.xy_bounds(tile)
with pytest.raises(rioxarray.exceptions.OneDimensionalRaster) as error:
dst.tile(tile.x, tile.y, zoom, auto_expand=False)
assert (
str(error.value)
== "At least one of the clipped raster x,y coordinates has only one point."
)
assert "At least one of the clipped raster x,y coordinates" in str(error.value)

# Test that a high-zoom tile will succeed with auto_expand=True (and that is the default)
img = dst.tile(tile.x, tile.y, zoom)
Expand Down

0 comments on commit c20142e

Please sign in to comment.