File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44import six
55
66import os
7- import sys
87import tempfile
98import warnings
109
1514 get_fontconfig_fonts , is_opentype_cff_font , fontManager as fm )
1615from matplotlib import rc_context
1716
17+ if six .PY2 :
18+ from distutils .spawn import find_executable
19+ has_fclist = find_executable ('fc-list' ) is not None
20+ else :
21+ # py >= 3.3
22+ from shutil import which
23+ has_fclist = which ('fc-list' ) is not None
24+
1825
1926def test_font_priority ():
2027 with rc_context (rc = {
@@ -65,6 +72,6 @@ def test_otf():
6572 assert res == is_opentype_cff_font (f )
6673
6774
68- @pytest .mark .skipif (sys . platform == 'win32' , reason = 'no fontconfig on Windows ' )
75+ @pytest .mark .skipif (not has_fclist , reason = 'no fontconfig installed ' )
6976def test_get_fontconfig_fonts ():
7077 assert len (get_fontconfig_fonts ()) > 1
You can’t perform that action at this time.
0 commit comments