From 684db70e95dab364362398cb62bc0499047459ff Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 19 May 2014 08:54:49 -0400 Subject: [PATCH] TST : force re-building of font-cache - there should be a better way to do this, this will get the tests passing again. --- lib/matplotlib/tests/test_font_manager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/tests/test_font_manager.py b/lib/matplotlib/tests/test_font_manager.py index df2675219023..c55be8846759 100644 --- a/lib/matplotlib/tests/test_font_manager.py +++ b/lib/matplotlib/tests/test_font_manager.py @@ -6,7 +6,7 @@ import os -from matplotlib.font_manager import findfont, FontProperties +from matplotlib.font_manager import findfont, FontProperties, _rebuild from matplotlib import rc_context @@ -14,6 +14,10 @@ def test_font_priority(): with rc_context(rc={ 'font.sans-serif': ['cmmi10', 'Bitstream Vera Sans']}): + # force the font manager to rebuild it self + _rebuild() font = findfont( FontProperties(family=["sans-serif"])) assert_equal(os.path.basename(font), 'cmmi10.ttf') + # force it again + _rebuild()