diff --git a/lib/matplotlib/tests/test_font_manager.py b/lib/matplotlib/tests/test_font_manager.py index 43b67e144482..ad7f5b349246 100644 --- a/lib/matplotlib/tests/test_font_manager.py +++ b/lib/matplotlib/tests/test_font_manager.py @@ -197,4 +197,5 @@ def _model_handler(_): def test_fork(): _model_handler(0) # Make sure the font cache is filled. ctx = multiprocessing.get_context("fork") - ctx.Pool(processes=2).map(_model_handler, range(2)) + with ctx.Pool(processes=2) as pool: + pool.map(_model_handler, range(2))
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: