Skip to content

Commit

Permalink
test: add calculated pressure
Browse files Browse the repository at this point in the history
  • Loading branch information
frodehk committed Sep 13, 2023
1 parent d92d9a8 commit 9735059
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ecalc/cli/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,17 @@ def test_json_advanced_model(self, advanced_yaml_path, tmp_path):
requested_inlet_pressure_train = compressor_train["requested_inlet_pressure"]["values"]
requested_outlet_pressure_train = compressor_train["requested_outlet_pressure"]["values"]

calculated_inlet_pressure_train = compressor_train["stage_results"][0]["inlet_stream_condition"]["pressure"]
calculated_outlet_pressure_train = compressor_train["stage_results"][-1]["outlet_stream_condition"]["pressure"]

assert requested_inlet_pressure_tabular == [20] * len(compressor_tabular["timesteps"])
assert requested_outlet_pressure_tabular == [200] * len(compressor_tabular["timesteps"])
assert requested_inlet_pressure_train == [20] * len(compressor_train["timesteps"])
assert requested_outlet_pressure_train == [120] * len(compressor_train["timesteps"])

assert calculated_inlet_pressure_train == [20] * len(compressor_train["timesteps"])
assert list(calculated_outlet_pressure_train) == [119.99999999999999] * len(compressor_train["timesteps"])


class TestLtpExport:
@pytest.mark.snapshot
Expand Down

0 comments on commit 9735059

Please sign in to comment.