Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4074791

Browse files
committed
Add test
1 parent 314a0cf commit 4074791

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

lib/matplotlib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,7 @@ def tk_window_focus():
13221322
'matplotlib.tests.test_dates',
13231323
'matplotlib.tests.test_delaunay',
13241324
'matplotlib.tests.test_figure',
1325+
'matplotlib.tests.test_font_manager',
13251326
'matplotlib.tests.test_gridspec',
13261327
'matplotlib.tests.test_image',
13271328
'matplotlib.tests.test_legend',
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from __future__ import (absolute_import, division, print_function,
2+
unicode_literals)
3+
4+
import six
5+
6+
import os
7+
8+
from matplotlib.font_manager import findfont, FontProperties
9+
from matplotlib import rc_context
10+
11+
12+
def test_font_priority():
13+
with rc_context(rc={
14+
'font.sans-serif':
15+
['cmmi10', 'Bitstream Vera Sans']}):
16+
font = findfont(
17+
FontProperties(family=["sans-serif"]))
18+
assert os.path.basename(font) == 'cmmi10.ttf'

0 commit comments

Comments
 (0)