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):
1284
1284
return False
1285
1285
1286
1286
fontManager = None
1287
+ _fmcache = None
1287
1288
1288
1289
# The experimental fontconfig-based backend.
1289
1290
if USE_FONTCONFIG and sys .platform != 'win32' :
@@ -1329,10 +1330,6 @@ def findfont(prop, fontext='ttf'):
1329
1330
_fmcache = os .path .join (cachedir , 'fontList.py3k.cache' )
1330
1331
else :
1331
1332
_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
1336
1333
1337
1334
fontManager = None
1338
1335
Original file line number Diff line number Diff line change 5
5
# See http://somethingaboutorange.com/mrl/projects/nose/1.0.0/usage.html
6
6
# for options.
7
7
8
+ import os
9
+ import time
10
+
8
11
import matplotlib
9
12
matplotlib .use ('agg' )
10
13
11
14
import nose
12
15
from matplotlib .testing .noseclasses import KnownFailure
13
16
from matplotlib import default_test_modules
14
17
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
+
15
25
def run ():
16
26
nose .main (addplugins = [KnownFailure ()],
17
27
defaultTest = default_test_modules )
You can’t perform that action at this time.
0 commit comments