mirror of
https://github.com/rasterio/rasterio.git
synced 2025-12-08 17:36:12 +00:00
19 lines
597 B
Python
19 lines
597 B
Python
"""Tests for fix of #1504"""
|
|
|
|
import rasterio
|
|
|
|
|
|
def test_overview_levels(path_cogeo_tif):
|
|
"""With sharing turned off, problem noted in #1504 vanishes"""
|
|
olevel = 0
|
|
with rasterio.open(path_cogeo_tif, overview_level=olevel) as src:
|
|
assert src.shape == (512, 512)
|
|
|
|
olevel = 1
|
|
with rasterio.open(path_cogeo_tif, sharing=False, overview_level=olevel) as src:
|
|
assert src.shape == (256, 256)
|
|
|
|
olevel = 2
|
|
with rasterio.open(path_cogeo_tif, sharing=False, overview_level=olevel) as src:
|
|
assert src.shape == (128, 128)
|