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

Skip to content

Commit f567fa6

Browse files
authored
Merge pull request #23658 from QuLogic/multi-font-tol
Increase tolerance on multi-font tests
2 parents a30b461 + 295c0a6 commit f567fa6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/matplotlib/tests/test_backend_pdf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def test_glyphs_subset():
387387
assert subfont.get_num_glyphs() == nosubfont.get_num_glyphs()
388388

389389

390-
@image_comparison(["multi_font_type3.pdf"])
390+
@image_comparison(["multi_font_type3.pdf"], tol=4.6)
391391
def test_multi_font_type3():
392392
fp = fm.FontProperties(family=["WenQuanYi Zen Hei"])
393393
if Path(fm.findfont(fp)).name != "wqy-zenhei.ttc":
@@ -400,7 +400,7 @@ def test_multi_font_type3():
400400
fig.text(0.15, 0.475, "There are 几个汉字 in between!")
401401

402402

403-
@image_comparison(["multi_font_type42.pdf"])
403+
@image_comparison(["multi_font_type42.pdf"], tol=2.2)
404404
def test_multi_font_type42():
405405
fp = fm.FontProperties(family=["WenQuanYi Zen Hei"])
406406
if Path(fm.findfont(fp)).name != "wqy-zenhei.ttc":

lib/matplotlib/tests/test_backend_ps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def test_no_duplicate_definition():
274274
assert max(Counter(wds).values()) == 1
275275

276276

277-
@image_comparison(["multi_font_type3.eps"])
277+
@image_comparison(["multi_font_type3.eps"], tol=0.51)
278278
def test_multi_font_type3():
279279
fp = fm.FontProperties(family=["WenQuanYi Zen Hei"])
280280
if Path(fm.findfont(fp)).name != "wqy-zenhei.ttc":
@@ -287,7 +287,7 @@ def test_multi_font_type3():
287287
fig.text(0.15, 0.475, "There are 几个汉字 in between!")
288288

289289

290-
@image_comparison(["multi_font_type42.eps"])
290+
@image_comparison(["multi_font_type42.eps"], tol=1.6)
291291
def test_multi_font_type42():
292292
fp = fm.FontProperties(family=["WenQuanYi Zen Hei"])
293293
if Path(fm.findfont(fp)).name != "wqy-zenhei.ttc":

lib/matplotlib/tests/test_backend_svg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def test_svg_metadata():
470470
assert values == metadata['Keywords']
471471

472472

473-
@image_comparison(["multi_font_aspath.svg"])
473+
@image_comparison(["multi_font_aspath.svg"], tol=1.8)
474474
def test_multi_font_type3():
475475
fp = fm.FontProperties(family=["WenQuanYi Zen Hei"])
476476
if Path(fm.findfont(fp)).name != "wqy-zenhei.ttc":

0 commit comments

Comments
 (0)