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.
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:
missing_sourceskwarg): 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': raisesValueErrornaming the bad value.read_vrt) and dask (open_geotiff(... .vrt ..., chunks=...)) paths get exercised for each case.Done when: