From 9f7b5c678cf188477f561f32bc6b45cd402a5740 Mon Sep 17 00:00:00 2001 From: lukas leufen <l.leufen@fz-juelich.de> Date: Thu, 28 Nov 2019 15:49:32 +0100 Subject: [PATCH] try to reduce fixes --- test/test_modules/test_pre_processing.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/test/test_modules/test_pre_processing.py b/test/test_modules/test_pre_processing.py index 92efaf38..1af910ee 100644 --- a/test/test_modules/test_pre_processing.py +++ b/test/test_modules/test_pre_processing.py @@ -31,7 +31,6 @@ class TestPreProcessing: @pytest.fixture def obj_with_exp_setup(self): - RunEnvironment() ExperimentSetup(parser_args={}, stations=['DEBW107', 'DEBY081', 'DEBW013', 'DEBW076', 'DEBW087', 'DEBW001'], var_all_dict={'o3': 'dma8eu', 'temp': 'maximum'}, station_type="background") pre = object.__new__(PreProcessing) @@ -43,12 +42,11 @@ class TestPreProcessing: ExperimentSetup(parser_args={}, stations=['DEBW107', 'DEBY081', 'DEBW013', 'DEBW076', 'DEBW087'], var_all_dict={'o3': 'dma8eu', 'temp': 'maximum'}) caplog.set_level(logging.INFO) - with PreProcessing(): - time.sleep(0.1) # sometimes the destruction logging is delayed during CI testing, so wait a little - assert caplog.record_tuples[0] == ('root', 20, 'PreProcessing started') - assert caplog.record_tuples[1] == ('root', 20, 'check valid stations started') - assert caplog.record_tuples[-1] == ('root', 20, PyTestRegex(r'run for \d+\.\d+s to check 5 station\(s\). Found ' - r'5/5 valid stations.')) + PreProcessing() + assert caplog.record_tuples[0] == ('root', 20, 'PreProcessing started') + assert caplog.record_tuples[1] == ('root', 20, 'check valid stations started') + assert caplog.record_tuples[-1] == ('root', 20, PyTestRegex(r'run for \d+\.\d+s to check 5 station\(s\). Found ' + r'5/5 valid stations.')) RunEnvironment().__del__() def test_run(self, obj_with_exp_setup): -- GitLab