From feb1e84e24f506c837130d331604cc60eaca45b0 Mon Sep 17 00:00:00 2001 From: pkdash Date: Fri, 21 Apr 2023 15:09:30 -0400 Subject: [PATCH] [#44] fixing tests for aggregation data objects --- tests/test_data_objects.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_data_objects.py b/tests/test_data_objects.py index 25c0e8c..49af289 100644 --- a/tests/test_data_objects.py +++ b/tests/test_data_objects.py @@ -1,4 +1,5 @@ import os +import pathlib import tempfile import fiona @@ -127,7 +128,8 @@ def test_raster_save_data_object(resource_with_raster_aggr, as_new_aggr): subset_band = rasterio_reader.read(1, window=subset_window) output_raster_dir_path = os.path.join(tmp, "updated_aggr") os.makedirs(output_raster_dir_path) - output_raster_file_path = os.path.join(output_raster_dir_path, "logan.tif") + update_raster_filename = "updated_logan.tif" + output_raster_file_path = os.path.join(output_raster_dir_path, update_raster_filename) profile = rasterio_reader.profile rasterio_reader.close() profile['driver'] = "GTiff" @@ -153,6 +155,7 @@ def test_raster_save_data_object(resource_with_raster_aggr, as_new_aggr): # download aggregation unzip_to = os.path.join(tmp, "unzipped_aggr") os.makedirs(unzip_to) + file_path = pathlib.Path(update_raster_filename).stem + ".vrt" if as_new_aggr: file_path = f"{dst_path}/{file_path}"