diff --git a/test/test_modules/test_pre_processing.py b/test/test_modules/test_pre_processing.py index 92efaf38974aaf232c8688ec2f83fc89a0c7787b..1af910ee660510c5667e6170c82c079dcf515bb2 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):