diff --git a/src/tile_mate/stitcher.py b/src/tile_mate/stitcher.py index ab0ba64..c605e06 100644 --- a/src/tile_mate/stitcher.py +++ b/src/tile_mate/stitcher.py @@ -65,7 +65,7 @@ def toggle_hansen_url(url: str) -> str: if year is not None: if tile_key not in DATASETS_WITH_YEAR: - raise NotImplementedError('Year is only supported ' f'with {DATASETS_WITH_YEAR}') + raise ValueError('Year is only supported ' f'with {DATASETS_WITH_YEAR}') if tile_key == 'hansen_annual_mosaic': def update_hansen_landsat_mosaic_url_p(url): return update_hansen_landsat_mosaic_url(url, year) diff --git a/tests/test_stitch_api.py b/tests/test_stitch_api.py index 62c2e1b..aa64560 100644 --- a/tests/test_stitch_api.py +++ b/tests/test_stitch_api.py @@ -65,7 +65,7 @@ def test_cop100_dataset(year: int): @pytest.mark.parametrize( - 'dataset_shortname', ['hansen_gain', 'hansen_tree', 'hansen_lossyear', 'hand', 'pekel_water_occ_2021'] + 'dataset_shortname', ['hansen_gain', 'hansen_treecover_2000', 'hansen_lossyear', 'hand', 'pekel_water_occ_2021'] ) def test_no_kwarg_datasets(dataset_shortname): bounds = [-120.45, 34.85, -120.15, 34.95]