Skip to content

Tests: cover cupy median/mode, dask+cupy, integer input, target_resolution tuple in resample #1470

@brendancol

Description

@brendancol

A test coverage audit on xrspatial.resample turned up four gaps. These aren't bug reports — they're paths we expect to work but never actually exercise.

Gaps

  1. CuPy parity for median and mode. TestCuPyParity::test_aggregate_parity only runs average, min, max. The cupy backend hands median and mode off to CPU inside _run_cupy, and the cupy-in / cupy-out round-trip isn't checked anywhere.

  2. dask+cupy parity. TestDaskParity covers dask+numpy. Nothing covers dask+cupy, so one corner of the four-backend matrix is dark.

  3. Integer-dtype input. Every existing test uses float32. The API doesn't say "floats only," so int32 / uint8 rasters should resample to float output without clipping or overflow.

  4. target_resolution tuple. test_target_resolution only hits the scalar form. The tuple form target_resolution=(y, x) works in the source but isn't tested.

Change

Tests only — xrspatial/tests/test_resample.py. No source changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    QA/QCbackend-coverageAdding missing dask/cupy/dask+cupy backend support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions