diff --git a/test/test_modules.py b/test/test_modules.py index 6048a7d29d7f3f8bcb42a0656d2c610e388c9b87..f5d281efc3888c88c2392d629dd78155c7eaee37 100644 --- a/test/test_modules.py +++ b/test/test_modules.py @@ -44,7 +44,8 @@ class TestPreProcessing: def test_init(self, caplog): caplog.set_level(logging.INFO) - setup = ExperimentSetup({}, stations=['DEBW107', 'DEBY081', 'DEBW013', 'DEBW076', 'DEBW087']) + setup = ExperimentSetup({}, stations=['DEBW107', 'DEBY081', 'DEBW013', 'DEBW076', 'DEBW087'], + var_all_dict={'o3': 'dma8eu', 'temp': 'maximum'}) pre = PreProcessing(setup) assert caplog.record_tuples[0] == ('root', 20, 'PreProcessing started') assert caplog.record_tuples[1] == ('root', 20, 'check valid stations started') @@ -52,7 +53,9 @@ class TestPreProcessing: def test_run(self): pre_processing = object.__new__(PreProcessing) - pre_processing.setup = ExperimentSetup({}, stations=['DEBW107', 'DEBY081', 'DEBW013', 'DEBW076', 'DEBW087']) + pre_processing.time = TimeTracking() + pre_processing.setup = ExperimentSetup({}, stations=['DEBW107', 'DEBY081', 'DEBW013', 'DEBW076', 'DEBW087'], + var_all_dict={'o3': 'dma8eu', 'temp': 'maximum'}) assert pre_processing._run() is None def test_split_train_val_test(self): @@ -61,7 +64,9 @@ class TestPreProcessing: def test_check_valid_stations(self, caplog): caplog.set_level(logging.INFO) pre = object.__new__(PreProcessing) - pre.setup = ExperimentSetup({}, stations=['DEBW107', 'DEBY081', 'DEBW013', 'DEBW076', 'DEBW087']) + pre.time = TimeTracking() + pre.setup = ExperimentSetup({}, stations=['DEBW107', 'DEBY081', 'DEBW013', 'DEBW076', 'DEBW087'], + var_all_dict={'o3': 'dma8eu', 'temp': 'maximum'}) kwargs = {'start': '1997-01-01', 'end': '2017-12-31', 'limit_nan_fill': 1, 'window_history': 13, 'window_lead_time': 3, 'interpolate_method': 'linear', 'statistics_per_var': pre.setup.var_all_dict, }