File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 4
4
import six
5
5
6
6
import os
7
- import sys
8
7
import tempfile
9
8
import warnings
10
9
15
14
get_fontconfig_fonts , is_opentype_cff_font , fontManager as fm )
16
15
from matplotlib import rc_context
17
16
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
+
18
25
19
26
def test_font_priority ():
20
27
with rc_context (rc = {
@@ -65,6 +72,6 @@ def test_otf():
65
72
assert res == is_opentype_cff_font (f )
66
73
67
74
68
- @pytest .mark .skipif (sys . platform == 'win32' , reason = 'no fontconfig on Windows ' )
75
+ @pytest .mark .skipif (not has_fclist , reason = 'no fontconfig installed ' )
69
76
def test_get_fontconfig_fonts ():
70
77
assert len (get_fontconfig_fonts ()) > 1
You can’t perform that action at this time.
0 commit comments