Skip to content

Commit

Permalink
test Victor's process graph #424
Browse files Browse the repository at this point in the history
  • Loading branch information
bossie committed Jul 17, 2024
1 parent 71dc08c commit cebeb82
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion tests/test_batch_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from openeo_driver.utils import EvalEnv
from openeogeotrellis.deploy.batch_job import run_job
from openeogeotrellis.deploy.batch_job_metadata import extract_result_metadata
from .data import TEST_DATA_ROOT
from .data import get_test_data_file, TEST_DATA_ROOT


def test_png_export(tmp_path):
Expand Down Expand Up @@ -978,3 +978,23 @@ def test_multiple_top_level_side_effects(tmp_path, caplog):

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


def test_multiple_save_results(tmp_path):
with open(get_test_data_file("multiple_save_results/pg01.json")) as f:
process = json.load(f)

run_job(
process,
output_file=tmp_path / "out",
metadata_file=tmp_path / "job_metadata.json",
api_version="2.0.0",
job_dir=tmp_path,
dependencies=[],
)

with rasterio.open(tmp_path / "intermediate.tif") as dataset:
assert dataset.res == (10, 10)

with rasterio.open(tmp_path / "final.tif") as dataset:
assert dataset.res == (80, 80)

0 comments on commit cebeb82

Please sign in to comment.