From 57ff957dacf5836c42a5a7e0a4795bdc560a57c2 Mon Sep 17 00:00:00 2001 From: Timo Rothenpieler Date: Tue, 6 Sep 2022 14:11:07 +0200 Subject: [PATCH] Reset multiprocessing before every test --- oggm/tests/conftest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oggm/tests/conftest.py b/oggm/tests/conftest.py index 1223c030e..bf92b7075 100644 --- a/oggm/tests/conftest.py +++ b/oggm/tests/conftest.py @@ -19,6 +19,7 @@ from oggm.utils import mkdir, _downloads from oggm.utils import oggm_urlretrieve from oggm.tests import HAS_MPL_FOR_TESTS, HAS_INTERNET +from oggm.workflow import reset_multiprocessing logger = logging.getLogger(__name__) @@ -103,6 +104,7 @@ def test_wrapper(*args, **kwargs): def restore_oggm_cfg(): """Ensures a test cannot pollute cfg for other tests running after it""" old_cfg = cfg.pack_config() + reset_multiprocessing() yield cfg.unpack_config(old_cfg)