Skip to content

Commit 5c2dfa3

Browse files
frenzymadnessQuLogic
authored andcommitted
TST: Ignore a new fork deprecation warning in Python 3.15
1 parent 43b7976 commit 5c2dfa3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/matplotlib/tests/test_font_manager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,9 @@ def _model_handler(_):
286286
reason='emscripten does not support subprocesses')
287287
@pytest.mark.skipif(not hasattr(os, "register_at_fork"),
288288
reason="Cannot register at_fork handlers")
289+
# Python 3.15+ raises DeprecationWarning for fork in multi-threaded process
290+
@pytest.mark.filterwarnings("ignore:.*multi-threaded.*fork.*:DeprecationWarning")
291+
@pytest.mark.filterwarnings("ignore:.*multi-threaded.*fork.*:RuntimeWarning")
289292
def test_fork():
290293
_model_handler(0) # Make sure the font cache is filled.
291294
ctx = multiprocessing.get_context("fork")

0 commit comments

Comments
 (0)