Skip to content

Commit b41da43

Browse files
committed
Fix test assertion about block_size
1 parent 605c384 commit b41da43

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/test_dask_rasterio.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,10 @@ def test_read_raster_band_with_block_size(some_raster_path):
199199
assert_array_equal(array, array_4b)
200200

201201
with rasterio.open(some_raster_path) as src:
202-
ch, cw = src.block_shapes[0]
202+
block_height, block_width = src.block_shapes[0]
203+
height, width = src.shape
203204

204-
assert array.chunks[0][0] == ch
205-
assert array.chunks[1][0] == cw
206-
assert array_4b.chunks[0][0] == ch * 4
207-
assert array_4b.chunks[1][0] == cw * 4
205+
assert array.chunks[0][0] == block_height
206+
assert array.chunks[1][0] == block_width
207+
assert array_4b.chunks[0][0] == min(block_height * 4, height)
208+
assert array_4b.chunks[1][0] == min(block_width * 4, width)

0 commit comments

Comments
 (0)