Skip to content

Commit

Permalink
Fix layer index that starts at zero for older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
janvonrickenbach committed Nov 20, 2023
1 parent ed2550c commit 406d4f4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/composite_model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ def check_output(failure_label: FailureOutput, expected_output: dict[int, float]
9: 1,
10: 1,
}

if not version_equal_or_later(dpf_server, "7.1"):
for element_id in expected_layer_index:
# Older versions of the server returned a layer index that starts
# at 0 instead of 1
expected_layer_index[element_id] -= 1

check_output(FailureOutput.MAX_LAYER_INDEX, expected_layer_index)

expected_output_ref_surface = {
Expand Down

0 comments on commit 406d4f4

Please sign in to comment.