Skip to content
Snippets Groups Projects
Commit 0efbc11a authored by leufen1's avatar leufen1
Browse files

fixed tests

parent a1cd45a7
No related branches found
No related tags found
3 merge requests!253include current develop,!252Resolve "release v1.3.0",!232Resolve "Make IntelliO3-ts v1.0 available as reference"
......@@ -13,7 +13,7 @@ import numpy as np
import pandas as pd
from mlair.data_handler import DataCollection, AbstractDataHandler
from mlair.helpers import TimeTracking
from mlair.helpers import TimeTracking, to_list
from mlair.configuration import path_config
from mlair.helpers.join import EmptyQueryResult
from mlair.run_modules.run_environment import RunEnvironment
......@@ -334,8 +334,8 @@ class PreProcessing(RunEnvironment):
data if required.
"""
logging.info("Searching for competitors to be prepared for use.")
competitors = self.data_store.get_default("competitors", default=None)
if competitors is not None:
competitors = to_list(self.data_store.get_default("competitors", default=[]))
if len(competitors) > 0:
for competitor_name in competitors:
if competitor_name.lower() == "IntelliO3-ts-v1".lower():
logging.info("Prepare IntelliO3-ts-v1 model")
......
......@@ -46,8 +46,12 @@ class TestPreProcessing:
with PreProcessing():
assert caplog.record_tuples[0] == ('root', 20, 'PreProcessing started')
assert caplog.record_tuples[1] == ('root', 20, 'check valid stations started (preprocessing)')
assert caplog.record_tuples[-1] == ('root', 20, PyTestRegex(r'run for \d+:\d+:\d+ \(hh:mm:ss\) to check 5 '
assert caplog.record_tuples[-3] == ('root', 20, PyTestRegex(r'run for \d+:\d+:\d+ \(hh:mm:ss\) to check 5 '
r'station\(s\). Found 5/5 valid stations.'))
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.")
RunEnvironment().__del__()
def test_run(self, obj_with_exp_setup):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment