File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ def test_font_priority():
24
24
'font.sans-serif' :
25
25
['cmmi10
97E0
' , 'Bitstream Vera Sans' ]}):
26
26
font = findfont (FontProperties (family = ["sans-serif" ]))
27
- assert Path (font ).name == 'cmmi10.ttf'
27
+ # first font should be cmmi10.ttf
28
+ assert Path (next (iter (font .values ()))).name == 'cmmi10.ttf'
28
29
29
30
# Smoketest get_charmap, which isn't used internally anymore
30
31
font = get_font (font )
@@ -110,7 +111,7 @@ def test_utf16m_sfnt():
110
111
111
112
def test_find_ttc ():
112
113
fp = FontProperties (family = ["WenQuanYi Zen Hei" ])
113
- if Path ( findfont ( fp )). name != "wqy-zenhei.ttc" :
114
+ if "wqy-zenhei.ttc" not in map ( lambda x : Path ( x ). name , findfont ( fp )) :
114
115
pytest .skip ("Font may be missing" )
115
116
116
117
fig , ax = plt .subplots ()
You can’t perform that action at this time.
0 commit comments