From 8f921e390e60e0cfc40ff5802bd88af5d7f86470 Mon Sep 17 00:00:00 2001 From: lukas leufen <l.leufen@fz-juelich.de> Date: Thu, 28 Nov 2019 15:44:18 +0100 Subject: [PATCH] another modification to solve failing --- test/test_modules/test_pre_processing.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/test_modules/test_pre_processing.py b/test/test_modules/test_pre_processing.py index 2004f85c..5120a26b 100644 --- a/test/test_modules/test_pre_processing.py +++ b/test/test_modules/test_pre_processing.py @@ -42,12 +42,12 @@ class TestPreProcessing: ExperimentSetup(parser_args={}, stations=['DEBW107', 'DEBY081', 'DEBW013', 'DEBW076', 'DEBW087'], var_all_dict={'o3': 'dma8eu', 'temp': 'maximum'}) caplog.set_level(logging.INFO) - 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[-2] == ('root', 20, PyTestRegex(r'run for \d+\.\d+s to check 5 station\(s\). Found ' - r'5/5 valid stations.')) + 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.')) RunEnvironment().__del__() def test_run(self, obj_with_exp_setup): -- GitLab