From 45a56d051bf03c94a7dfbd3fe687c9e66fc14266 Mon Sep 17 00:00:00 2001 From: Pavel Grunt Date: Fri, 28 Oct 2022 19:28:39 +0200 Subject: [PATCH] Run test if fontconfig is present The test uses _get_fontconfig_fonts methods --- lib/matplotlib/tests/test_font_manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/tests/test_font_manager.py b/lib/matplotlib/tests/test_font_manager.py index 2a34122d48e1..b1b5b37f039a 100644 --- a/lib/matplotlib/tests/test_font_manager.py +++ b/lib/matplotlib/tests/test_font_manager.py @@ -150,7 +150,8 @@ def test_find_invalid(tmpdir): FT2Font(StringIO()) -@pytest.mark.skipif(sys.platform != 'linux', reason='Linux only') +@pytest.mark.skipif(sys.platform != 'linux' or not has_fclist, + reason='only Linux with fontconfig installed') def test_user_fonts_linux(tmpdir, monkeypatch): font_test_file = 'mpltest.ttf'