Skip to content

VRT tests: negative coverage for unsupported features (#2342 work item) #2370

@brendancol

Description

@brendancol

Sub-task of #2342.

The release does not promise full GDAL VRT parity. Unsupported VRT features should fail with actionable errors instead of silently producing wrong data. Add negative test coverage that pins the rejection contract.

Cases that must raise:

  • Warped VRT (<VRTRasterBand subClass="VRTWarpedRasterBand"> or a VRT containing <GDALWarpOptions>).
  • Nested VRT (a .vrt referenced as <SourceFilename> inside another .vrt).
  • Mixed source CRS across band sources.
  • Mixed source dtype across band sources where the output dtype is ambiguous.
  • Mixed band count across sources.
  • Complex mask source semantics that the attrs contract cannot represent.
  • Unsupported resample algorithm (anything outside the implemented subset).

Each test asserts the exception type and checks that the error message names the unsupported feature.

Acceptance:

  • One dedicated test per rejection path.
  • Both read_vrt and open_geotiff(... .vrt ...) are exercised.

Coordination notes:

  • Sibling PR 1 adds a centralized validate_vrt_capability. Where current code already rejects a case, lock that in directly. Where rejection depends on PR 1, mark with pytest.xfail.
  • Sibling PRs in parallel: PR 2 positive mosaics, PR 4 missing-source policy, PR 5 docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgeotiffGeoTIFF moduletestsTest coverage and parityvrtVRT support contract

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions