Skip to content

Commit

Permalink
DAS-2031: Update regression tests with new images and metadata. (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
flamingbear committed Nov 8, 2023
1 parent 31fb757 commit 59fa336
Show file tree
Hide file tree
Showing 13 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions test/hybig/HyBIG_Regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
" print_success('all test files generated')\n",
"\n",
" expected_output_metadata = {\n",
" 'driver': 'PNG', **common_aster_metadata, 'count': 1\n",
" **common_aster_metadata, 'driver': 'PNG', 'count': 1, 'nodata': 255\n",
" }\n",
"\n",
" assert_dataset_produced_correct_results(\n",
Expand Down Expand Up @@ -278,8 +278,6 @@
" expected_output_metadata = {\n",
" 'driver': 'JPEG', **common_aster_metadata, 'count': 3\n",
" } \n",
" with rasterio.open(test_files[0]) as test_file:\n",
" print(test_file.meta)\n",
"\n",
" assert_dataset_produced_correct_results(\n",
" test_files[0], expected_output_metadata, reference_files[0], 'JPEG'\n",
Expand Down Expand Up @@ -442,7 +440,7 @@
" print_success('all test files generated')\n",
"\n",
" expected_output_metadata = {\n",
" 'driver': 'PNG', 'count': 1, **common_measures_metadata\n",
" **common_measures_metadata, 'driver': 'PNG', 'count': 1 \n",
" }\n",
"\n",
" assert_dataset_produced_correct_results(\n",
Expand Down
Binary file modified test/hybig/reference_data/ASTGTMV003_N00E022_dem.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/hybig/reference_data/ASTGTMV003_N00E022_dem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/hybig/reference_data/VCF5KYR_1991001_001_2018224205008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion test/hybig/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def assert_dataset_produced_correct_results(
with rasterio.open(generated_file) as test_dataset:
assert (
test_dataset.meta == expected_metadata
), f'output {file_type} has incorrect metadata'
), f'output {file_type} has incorrect metadata: {test_dataset.meta}'
print_success('Generated image has correct metadata.')

with rasterio.open(reference_file) as reference_dataset:
Expand Down
2 changes: 1 addition & 1 deletion test/hybig/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.4
0.0.5

0 comments on commit 59fa336

Please sign in to comment.