Skip to content

Commit

Permalink
Reset multiprocessing before every test
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoRoth committed Sep 6, 2022
1 parent b728399 commit 57ff957
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions oggm/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 57ff957

Please sign in to comment.