Skip to content

Commit

Permalink
mimic actual process graph (2 geotiffs as output) #424
Browse files Browse the repository at this point in the history
  • Loading branch information
bossie committed Jul 16, 2024
1 parent 17ce2dd commit 71dc08c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/test_batch_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,8 @@ def test_multiple_top_level_side_effects(tmp_path, caplog):
"process_id": "save_result",
"arguments": {
"data": {"from_node": "loadcollection1"},
"format": "GTiff"
"format": "GTiff",
"options": {"filename_prefix": "intermediate"},
}
},
"mergecubes1": {
Expand All @@ -953,7 +954,8 @@ def test_multiple_top_level_side_effects(tmp_path, caplog):
"process_id": "save_result",
"arguments": {
"data": {"from_node": "mergecubes1"},
"format": "netCDF"
"format": "GTiff",
"options": {"filename_prefix": "final"},
}
},
}
Expand All @@ -971,8 +973,8 @@ def test_multiple_top_level_side_effects(tmp_path, caplog):

assert "intermediate result" in caplog.messages

with rasterio.open(tmp_path / "openEO_2024-07-15Z.tif") as f:
assert f.driver == "GTiff"
with rasterio.open(tmp_path / "intermediate_2024-07-15Z.tif") as dataset:
assert dataset.count == 1

with rasterio.open(tmp_path / "openEO.nc") as f:
assert f.driver == "netCDF"
with rasterio.open(tmp_path / "final_2024-07-15Z.tif") as dataset:
assert dataset.count == 2

0 comments on commit 71dc08c

Please sign in to comment.