Skip to content

Commit

Permalink
fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bossie committed Sep 26, 2024
1 parent 5cbb5e4 commit ee2b952
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions openeogeotrellis/geopysparkdatacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -1895,6 +1895,8 @@ def color_to_int(color):
band_count = -1
if self.metadata.has_band_dimension():
band_count = len(self.metadata.band_dimension.band_names)
for index, band_name in enumerate(self.metadata.band_dimension.band_names):
gtiff_options.addBandTag(index, "DESCRIPTION", str(band_name))

bands = []
if self.metadata.has_band_dimension():
Expand Down
10 changes: 5 additions & 5 deletions tests/test_batch_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def test_separate_asset_per_band(tmp_path, from_node, expected_names):
"process_id": "load_collection",
"arguments": {
"bands": ["TileRow", "TileCol"],
"id": "TestCollection-LonLat4x4",
"id": "TestCollection-LonLat16x16",
"properties": {},
"spatial_extent": {"west": 0.0, "south": 50.0, "east": 5.0, "north": 55.0},
"temporal_extent": ["2021-06-01", "2021-06-16"],
Expand Down Expand Up @@ -868,7 +868,7 @@ def test_multiple_image_collection_results(tmp_path):
"loadcollection1": {
"process_id": "load_collection",
"arguments": {
"id": "TestCollection-LonLat4x4",
"id": "TestCollection-LonLat16x16",
"spatial_extent": {"west": 0.0, "south": 50.0, "east": 5.0, "north": 55.0},
"temporal_extent": ["2021-01-04", "2021-01-06"],
"bands": ["Flat:2"]
Expand Down Expand Up @@ -916,7 +916,7 @@ def test_export_workspace(tmp_path):
"loadcollection1": {
"process_id": "load_collection",
"arguments": {
"id": "TestCollection-LonLat4x4",
"id": "TestCollection-LonLat16x16",
"temporal_extent": ["2021-01-05", "2021-01-06"],
"spatial_extent": {"west": 0.0, "south": 0.0, "east": 1.0, "north": 2.0},
"bands": ["Flat:2"]
Expand Down Expand Up @@ -994,7 +994,7 @@ def test_export_workspace(tmp_path):

# TODO: check other things e.g. proj:
finally:
shutil.rmtree(workspace_dir)
shutil.rmtree(workspace_dir, ignore_errors=True)


def test_discard_result(tmp_path):
Expand Down Expand Up @@ -1037,7 +1037,7 @@ def test_multiple_top_level_side_effects(tmp_path, caplog):
"loadcollection1": {
"process_id": "load_collection",
"arguments": {
"id": "TestCollection-LonLat4x4",
"id": "TestCollection-LonLat16x16",
"spatial_extent": {"west": 5, "south": 50, "east": 5.1, "north": 50.1},
"temporal_extent": ["2024-07-11", "2024-07-21"],
"bands": ["Flat:1"]
Expand Down

0 comments on commit ee2b952

Please sign in to comment.