Skip to content

VRT tests: missing_sources policy coverage for raise and warn (#2342 work item) #2367

@brendancol

Description

@brendancol

Sub-task of #2342.

The release docs say missing_sources='raise' is the default and 'warn' is opt-in. These tests lock that contract in for both eager and dask reads.

Cases to cover:

  • Default (no missing_sources kwarg): a VRT pointing at a non-existent source raises. Assert the exception type and that the message names the missing file.
  • missing_sources='raise' explicit: same as above.
  • missing_sources='warn': emits the warning class used in the code and names the missing source. The read returns an array with nodata in the corresponding region. Assert both the warning message and the output values.
  • missing_sources='invalid': raises ValueError naming the bad value.
  • Both eager (read_vrt) and dask (open_geotiff(... .vrt ..., chunks=...)) paths get exercised for each case.

Done when:

  • All cases pass under both read paths.
  • Assertions cover exception/warning types, messages, and output array values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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