From cd30d57df26c8a6b54782bcb40eb131425a413a4 Mon Sep 17 00:00:00 2001 From: "Carles S. Soriano Perez" Date: Wed, 18 Oct 2023 14:59:07 +0200 Subject: [PATCH] test: corrected koswat scenario nans --- ...est_reinforcement_profile_builder_factory.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/calculations/test_reinforcement_profile_builder_factory.py b/tests/calculations/test_reinforcement_profile_builder_factory.py index b8bb8a50..57645c2f 100644 --- a/tests/calculations/test_reinforcement_profile_builder_factory.py +++ b/tests/calculations/test_reinforcement_profile_builder_factory.py @@ -100,10 +100,10 @@ def _to_koswat_scenario( d_h=_section_scenario.d_h, d_s=_section_scenario.d_s, d_p=_section_scenario.d_p, - scenario_section = scenario_data.scenario_dike_section, - scenario_name = _section_scenario.scenario_name, - kruin_breedte = _section_scenario.kruin_breedte, - buiten_talud = _section_scenario.buiten_talud, + scenario_section=scenario_data.scenario_dike_section, + scenario_name=_section_scenario.scenario_name, + kruin_breedte=_section_scenario.kruin_breedte, + buiten_talud=_section_scenario.buiten_talud, ) yield _scenario @@ -255,6 +255,15 @@ def reinforcement_profile_case( ) ).build() + if math.isnan(_combination.koswat_scenario_case.kruin_breedte): + _combination.koswat_scenario_case.kruin_breedte = ( + _combination.input_profile_case.kruin_breedte + ) + if math.isnan(_combination.koswat_scenario_case.buiten_talud): + _combination.koswat_scenario_case.buiten_talud = ( + _combination.input_profile_case.buiten_talud + ) + def _get_reinforced_profile() -> ReinforcementProfileProtocol: _reinforcement = _combination.reinforcement_profile_type() # Input profile data.