-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
The test suite fails on Debian Sid (GNU/Linux x86_64).
$ python3 -m pytest --ignore tests/test_web.py -s tests/test_cogeo.py -k test_cog_translate_valiEnv
/usr/lib/python3/dist-packages/numcodecs/__init__.py:106: DeprecationWarning: crc32c usage is deprecated since numcodecs v0.16.4. It is recommended to install google_crc32c instead.
from numcodecs.checksum32 import CRC32, Adler32, JenkinsLookup3
=========================================================== test session starts ===========================================================
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /home/antonio/debian/itp/rio-cogeo/deb-src-01/rio-cogeo
configfile: pyproject.toml
plugins: zarr-3.1.5, hypothesis-6.148.7, typeguard-4.4.4
collected 50 items / 49 deselected / 1 selected
tests/test_cogeo.py F
================================================================ FAILURES =================================================================
_______________________________________________________ test_cog_translate_valiEnv ________________________________________________________
runner = <click.testing.CliRunner object at 0x77d65b634c20>
def test_cog_translate_valiEnv(runner):
"""Should work as expected (create cogeo file)."""
with runner.isolated_filesystem():
config = {"GDAL_TIFF_INTERNAL_MASK": False}
cog_translate(
raster_path_rgba,
"cogeo_env.tif",
jpeg_profile,
indexes=[1, 2, 3],
add_mask=True,
config=config,
quiet=True,
)
with rasterio.open("cogeo_env.tif") as src:
> assert "cogeo_env.tif.msk" in src.files
E AssertionError: assert 'cogeo_env.tif.msk' in ['cogeo_env.tif']
E + where ['cogeo_env.tif'] = <open DatasetReader name='cogeo_env.tif' mode='r'>.files
tests/test_cogeo.py:282: AssertionError
============================================================ warnings summary =============================================================
rio_cogeo/profiles.py:182
/home/antonio/debian/itp/rio-cogeo/deb-src-01/rio-cogeo/rio_cogeo/profiles.py:182: UserWarning: Non-standard compression schema: webp. The output COG might not be fully supported by software not build against latest libtiff.
warnings.warn(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================= short test summary info =========================================================
FAILED tests/test_cogeo.py::test_cog_translate_valiEnv - AssertionError: assert 'cogeo_env.tif.msk' in ['cogeo_env.tif']
=============================================== 1 failed, 49 deselected, 1 warning in 0.26s ===============================================
Additional information:
- Python 3.13. and 3.14
- rasterio v1.4.4
- gdal v3.12.1
Please note that changing the blocksize to 512 seems to fix the issue:
diff --git a/tests/test_cogeo.py b/tests/test_cogeo.py
index 81000ee..570b2af 100644
--- a/tests/test_cogeo.py
+++ b/tests/test_cogeo.py
@@ -268,11 +268,13 @@ def test_cog_translate_validOverviews(runner):
def test_cog_translate_valiEnv(runner):
"""Should work as expected (create cogeo file)."""
with runner.isolated_filesystem():
+ local_jpeg_profile = dict(jpeg_profile)
+ local_jpeg_profile.update({"blockxsize": 512, "blockysize": 512})
config = {"GDAL_TIFF_INTERNAL_MASK": False}
cog_translate(
raster_path_rgba,
"cogeo_env.tif",
- jpeg_profile,
+ local_jpeg_profile,
indexes=[1, 2, 3],
add_mask=True,
config=config,Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels