Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8530b1f

Browse files
committed
TST: Mark macosx backend in leak test as xfail
1 parent 4bb4dc7 commit 8530b1f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ def _test_figure_leak():
660660
reason="appveyor tests fail; gh-22988 suggests reworking")
661661
@pytest.mark.parametrize("env", _get_testable_interactive_backends())
662662
@pytest.mark.parametrize("time_mem", [(0.0, 2_000_000), (0.1, 30_000_000)])
663-
def test_figure_leak_20490(env, time_mem):
663+
def test_figure_leak_20490(env, time_mem, request):
664664
pytest.importorskip("psutil", reason="psutil needed to run this test")
665665

666666
# We haven't yet directly identified the leaks so test with a memory growth
@@ -669,9 +669,10 @@ def test_figure_leak_20490(env, time_mem):
669669
if env["MPLBACKEND"] == "wx":
670670
pytest.skip("wx backend is deprecated; tests failed on appveyor")
671671

672-
if env["MPLBACKEND"] == "macosx" or (
673-
env["MPLBACKEND"] == "tkagg" and sys.platform == 'darwin'
674-
):
672+
if env["MPLBACKEND"] == "macosx":
673+
request.node.add_marker(pytest.mark.xfail(reason="macosx backend is leaky"))
674+
675+
if env["MPLBACKEND"] == "tkagg" and sys.platform == "darwin":
675676
acceptable_memory_leakage += 11_000_000
676677

677678
result = _run_helper(

0 commit comments

Comments
 (0)