From 59318a8be968c34e71d821ea944d01edf4542c53 Mon Sep 17 00:00:00 2001 From: lukas leufen <l.leufen@fz-juelich.de> Date: Thu, 28 Nov 2019 15:35:14 +0100 Subject: [PATCH] add short sleep --- test/test_modules/test_pre_processing.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test_modules/test_pre_processing.py b/test/test_modules/test_pre_processing.py index 5c252125..8b79dc38 100644 --- a/test/test_modules/test_pre_processing.py +++ b/test/test_modules/test_pre_processing.py @@ -1,5 +1,6 @@ import logging import pytest +import time from src.helpers import PyTestRegex from src.modules.experiment_setup import ExperimentSetup @@ -13,7 +14,8 @@ class TestPreProcessing: @pytest.fixture def obj_no_init(self): - return object.__new__(PreProcessing) + yield object.__new__(PreProcessing) + RunEnvironment().__del__() @pytest.fixture def obj_super_init(self): @@ -41,6 +43,7 @@ class TestPreProcessing: var_all_dict={'o3': 'dma8eu', 'temp': 'maximum'}) caplog.set_level(logging.INFO) PreProcessing() + time.sleep(0.001) # 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 ' -- GitLab