From 2cd7e32ed27a1c4053d15202223b131aaac558b2 Mon Sep 17 00:00:00 2001
From: leufen1 <l.leufen@fz-juelich.de>
Date: Fri, 15 Jul 2022 16:50:15 +0200
Subject: [PATCH] fix some tests

---
 mlair/run_modules/pre_processing.py          | 5 +++--
 test/test_run_modules/test_pre_processing.py | 6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/mlair/run_modules/pre_processing.py b/mlair/run_modules/pre_processing.py
index ff21e27f..2b3bfa12 100644
--- a/mlair/run_modules/pre_processing.py
+++ b/mlair/run_modules/pre_processing.py
@@ -380,8 +380,9 @@ class PreProcessing(RunEnvironment):
                         data_collection = self.data_store.get("data_collection", subset)
                         stations.update({str(s): s.get_coordinates() for s in data_collection if s not in stations})
                     CAMSforecast("CAMS", ref_store_path=path, data_path=data_path).make_reference_available_locally(stations)
-
-
+                else:
+                    logging.info(f"No preparation required for competitor {competitor_name} as no specific instruction "
+                                 f"is provided.")
         else:
             logging.info("No preparation required because no competitor was provided to the workflow.")
 
diff --git a/test/test_run_modules/test_pre_processing.py b/test/test_run_modules/test_pre_processing.py
index 4618a5e4..743900bb 100644
--- a/test/test_run_modules/test_pre_processing.py
+++ b/test/test_run_modules/test_pre_processing.py
@@ -52,8 +52,8 @@ class TestPreProcessing:
             assert caplog.record_tuples[-4] == ('root', 20, "use serial create_info_df (val)")
             assert caplog.record_tuples[-3] == ('root', 20, "use serial create_info_df (test)")
             assert caplog.record_tuples[-2] == ('root', 20, "Searching for competitors to be prepared for use.")
-            assert caplog.record_tuples[-1] == ('root', 20, "No preparation required because no competitor was provided"
-                                                            " to the workflow.")
+            assert caplog.record_tuples[-1] == ('root', 20, "No preparation required for competitor ols as no specific "
+                                                            "instruction is provided.")
         RunEnvironment().__del__()
 
     def test_run(self, obj_with_exp_setup):
@@ -71,7 +71,7 @@ class TestPreProcessing:
                            "extreme_values", "extremes_on_right_tail_only", "upsampling"]
         assert data_store.search_scope("general.train") == sorted(expected_params)
         assert data_store.search_name("data_collection") == sorted(["general.train", "general.val", "general.test",
-                                                              "general.train_val"])
+                                                                    "general.train_val"])
 
     def test_create_set_split_not_all_stations(self, caplog, obj_with_exp_setup):
         caplog.set_level(logging.DEBUG)
-- 
GitLab