File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -1284,6 +1284,7 @@ def is_opentype_cff_font(filename):
12841284 return False
12851285
12861286fontManager = None
1287+ _fmcache = None
12871288
12881289# The experimental fontconfig-based backend.
12891290if USE_FONTCONFIG and sys .platform != 'win32' :
@@ -1329,10 +1330,6 @@ def findfont(prop, fontext='ttf'):
13291330 _fmcache = os .path .join (cachedir , 'fontList.py3k.cache' )
13301331 else :
13311332 _fmcache = os .path .join (cachedir , 'fontList.cache' )
1332- else :
1333- # Should only happen in a restricted environment (such as Google App
1334- # Engine). Deal with this gracefully by not caching fonts.
1335- _fmcache = None
13361333
13371334 fontManager = None
13381335
Original file line number Diff line number Diff line change 55# See http://somethingaboutorange.com/mrl/projects/nose/1.0.0/usage.html
66# for options.
77
8+ import os
9+ import time
10+
811import matplotlib
912matplotlib .use ('agg' )
1013
1114import nose
1215from matplotlib .testing .noseclasses import KnownFailure
1316from matplotlib import default_test_modules
1417
18+ from matplotlib import font_manager
19+ # Make sure the font caches are created before starting any possibly
20+ # parallel tests
21+ if font_manager ._fmcache is not None :
22+ while not os .path .exists (font_manager ._fmcache ):
23+ time .sleep (0.5 )
24+
1525def run ():
1626 nose .main (addplugins = [KnownFailure ()],
1727 defaultTest = default_test_modules )
You can’t perform that action at this time.
0 commit comments