diff --git a/xrspatial/geotiff/tests/golden_corpus/test_dask_gpu.py b/xrspatial/geotiff/tests/golden_corpus/test_dask_gpu.py index 9d0939a3..4f31e227 100644 --- a/xrspatial/geotiff/tests/golden_corpus/test_dask_gpu.py +++ b/xrspatial/geotiff/tests/golden_corpus/test_dask_gpu.py @@ -82,11 +82,12 @@ # xrspatial reader. The base-IFD parity check still runs; the # overview-level loop driven by ``candidate_factory`` is skipped for # these ids. See the eager module for the rationale. -_OVERVIEW_READER_GAPS: dict[str, str] = { - "overview_external_ovr_uint16": ( - "External .ovr sidecar reader is not implemented in xrspatial." - ), -} +# +# Empty now that the dask+GPU reader resolves the sibling ``.tif.ovr`` +# pyramid through the shared ``_sidecar`` discovery the eager numpy +# backend uses, so the overview-level comparison runs for +# ``overview_external_ovr_uint16`` on this backend too. +_OVERVIEW_READER_GAPS: dict[str, str] = {} _INTENTIONAL_SKIPS: dict[str, str] = { "nodata_miniswhite_uint8": ( diff --git a/xrspatial/geotiff/tests/golden_corpus/test_dask_numpy.py b/xrspatial/geotiff/tests/golden_corpus/test_dask_numpy.py index 1a80b71e..38c68cc3 100644 --- a/xrspatial/geotiff/tests/golden_corpus/test_dask_numpy.py +++ b/xrspatial/geotiff/tests/golden_corpus/test_dask_numpy.py @@ -78,11 +78,12 @@ # xrspatial reader. The base-IFD parity check still runs; the # overview-level loop driven by ``candidate_factory`` is skipped for # these ids. See the eager module for the rationale. -_OVERVIEW_READER_GAPS: dict[str, str] = { - "overview_external_ovr_uint16": ( - "External .ovr sidecar reader is not implemented in xrspatial." - ), -} +# +# Empty now that the dask reader resolves the sibling ``.tif.ovr`` +# pyramid through the shared ``_sidecar`` discovery the eager numpy +# backend uses, so the overview-level comparison runs for +# ``overview_external_ovr_uint16`` on this backend too. +_OVERVIEW_READER_GAPS: dict[str, str] = {} _INTENTIONAL_SKIPS: dict[str, str] = { "nodata_miniswhite_uint8": ( diff --git a/xrspatial/geotiff/tests/golden_corpus/test_fsspec.py b/xrspatial/geotiff/tests/golden_corpus/test_fsspec.py index 252a0d84..c1311382 100644 --- a/xrspatial/geotiff/tests/golden_corpus/test_fsspec.py +++ b/xrspatial/geotiff/tests/golden_corpus/test_fsspec.py @@ -84,13 +84,7 @@ # xrspatial reader. The base-IFD parity check still runs; the # overview-level loop driven by ``candidate_factory`` is skipped for # these ids. See the eager module for the rationale. -_OVERVIEW_READER_GAPS: dict[str, str] = { - "overview_external_ovr_uint16": ( - "External .ovr sidecar reader is not implemented in xrspatial. " - "The base IFD still parity-checks; the overview levels live in " - "a sibling .tif.ovr that the reader does not open." - ), -} +_OVERVIEW_READER_GAPS: dict[str, str] = {} _INTENTIONAL_SKIPS: dict[str, str] = { "nodata_miniswhite_uint8": ( @@ -152,6 +146,13 @@ def _serve_via_memory(payload: bytes, fixture_id: str) -> str: Returns the ``memory:///corpus/.tif`` URL the reader should open. The three-slash form is required: ``memory://`` writes must use a path beginning with ``/`` or fsspec rejects them. + + When the fixture ships a sibling ``.tif.ovr`` sidecar on disk, push + it under the matching ``.tif.ovr`` URL so the reader's fsspec + sidecar discovery (``_probe_fsspec`` -> ``load_sidecar``) can resolve + the external overview levels. Without it the memory filesystem holds + only the base ``.tif`` and ``overview_level>=1`` fails as out of + range, which is a test-harness gap rather than a reader limitation. """ fs = fsspec.filesystem("memory") url = f"memory:///corpus/{fixture_id}.tif" @@ -159,6 +160,9 @@ def _serve_via_memory(payload: bytes, fixture_id: str) -> str: # filesystems; ``test_cloud_read_byte_limit_1928.py`` uses the # same pattern. fs.pipe(f"/corpus/{fixture_id}.tif", payload) + sidecar_path = FIXTURES_DIR / f"{fixture_id}.tif.ovr" + if sidecar_path.exists(): + fs.pipe(f"/corpus/{fixture_id}.tif.ovr", sidecar_path.read_bytes()) return url diff --git a/xrspatial/geotiff/tests/golden_corpus/test_gpu.py b/xrspatial/geotiff/tests/golden_corpus/test_gpu.py index e9458103..54d5612d 100644 --- a/xrspatial/geotiff/tests/golden_corpus/test_gpu.py +++ b/xrspatial/geotiff/tests/golden_corpus/test_gpu.py @@ -84,11 +84,12 @@ # xrspatial reader. The base-IFD parity check still runs; the # overview-level loop driven by ``candidate_factory`` is skipped for # these ids. See the eager module for the rationale. -_OVERVIEW_READER_GAPS: dict[str, str] = { - "overview_external_ovr_uint16": ( - "External .ovr sidecar reader is not implemented in xrspatial." - ), -} +# +# Empty now that the GPU reader resolves the sibling ``.tif.ovr`` +# pyramid through the shared ``_sidecar`` discovery the eager numpy +# backend uses, so the overview-level comparison runs for +# ``overview_external_ovr_uint16`` on this backend too. +_OVERVIEW_READER_GAPS: dict[str, str] = {} # Fixtures whose codec is not implemented on the GPU read path and # legitimately need to fall back to CPU. The test routes these through