From 7f3434daa54d6012e8816f632e85be265dd1b990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Berland?= Date: Mon, 17 Jun 2024 16:02:41 +0200 Subject: [PATCH] wip: test num_cpu through baserunmodel --- .../unit_tests/run_models/test_base_run_model.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/unit_tests/run_models/test_base_run_model.py b/tests/unit_tests/run_models/test_base_run_model.py index c04fe9f6055..8e1cc897f8e 100644 --- a/tests/unit_tests/run_models/test_base_run_model.py +++ b/tests/unit_tests/run_models/test_base_run_model.py @@ -180,3 +180,19 @@ def test_delete_run_path(run_path_format, active_realizations): assert all(path.parent.exists() for path in expected_removed) assert all(path.exists() for path in expected_remaining) assert share_path.exists() + + +def test_num_cpu_is_propagated_from_config_to_ensemble(create_dummy_run_path): + config = MagicMock() + config.model_config = ModelConfig(runpath_format_string="realization-") + config.substitution_list = SubstitutionList() + + simulation_arguments = EnsembleExperimentRunArguments( + active_realizations=[0], + current_ensemble="Case_Name", + minimum_required_realizations=0, + ensemble_size=1, + stop_long_running=False, + ) + + brm = BaseRunModel(simulation_arguments, config, None, None, None)