Skip to content

Commit cfdc835

Browse files
committed
TST: Increase tolerances for FreeType 2.7.1.
1 parent 22121f2 commit cfdc835

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

lib/matplotlib/testing/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ def wrapper(*args, **kwargs):
406406
return decorator
407407

408408

409-
def image_comparison(baseline_images, extensions=None, tol=0,
409+
def image_comparison(baseline_images, extensions=None, tol=0.1,
410410
freetype_version=None, remove_text=False,
411411
savefig_kwarg=None,
412412
# Default of mpl_test_settings fixture and cleanup too.

lib/matplotlib/tests/test_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ def test_polar_rlabel_position():
672672

673673

674674
@image_comparison(baseline_images=['polar_theta_wedge'], style='default',
675-
tol=0.01 if six.PY2 else 0)
675+
tol=0.1)
676676
def test_polar_theta_limits():
677677
r = np.arange(0, 3.0, 0.01)
678678
theta = 2*np.pi*r
@@ -4679,7 +4679,7 @@ def test_rc_spines():
46794679

46804680

46814681
@image_comparison(baseline_images=['rc_grid'], extensions=['png'],
4682-
savefig_kwarg={'dpi': 40})
4682+
savefig_kwarg={'dpi': 40}, tol=0.2)
46834683
def test_rc_grid():
46844684
fig = plt.figure()
46854685
rc_dict0 = {

lib/matplotlib/tests/test_mathtext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def baseline_images(request, fontset, index):
174174
['cm', 'stix', 'stixsans', 'dejavusans',
175175
'dejavuserif'])
176176
@pytest.mark.parametrize('baseline_images', ['mathtext'], indirect=True)
177-
@image_comparison(baseline_images=None)
177+
@image_comparison(baseline_images=None, tol=0.31)
178178
def test_mathtext_rendering(baseline_images, fontset, index, test):
179179
matplotlib.rcParams['mathtext.fontset'] = fontset
180180
fig = plt.figure(figsize=(5.25, 0.75))
@@ -188,7 +188,7 @@ def test_mathtext_rendering(baseline_images, fontset, index, test):
188188
['cm', 'stix', 'stixsans', 'dejavusans',
189189
'dejavuserif'])
190190
@pytest.mark.parametrize('baseline_images', ['mathfont'], indirect=True)
191-
@image_comparison(baseline_images=None, extensions=['png'])
191+
@image_comparison(baseline_images=None, extensions=['png'], tol=0.3)
192192
def test_mathfont_rendering(baseline_images, fontset, index, test):
193193
matplotlib.rcParams['mathtext.fontset'] = fontset
194194
fig = plt.figure(figsize=(5.25, 0.75))

lib/matplotlib/tests/test_patches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def test_wedge_movement():
269269

270270
# png needs tol>=0.06, pdf tol>=1.617
271271
@image_comparison(baseline_images=['wedge_range'],
272-
remove_text=True, tol=1.65 if on_win else 0)
272+
remove_text=True, tol=0.1)
273273
def test_wedge_range():
274274
ax = plt.axes()
275275

lib/matplotlib/tests/test_patheffects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def test_SimplePatchShadow_offset():
125125
assert pe._offset == (4, 5)
126126

127127

128-
@image_comparison(baseline_images=['collection'], tol=0.015)
128+
@image_comparison(baseline_images=['collection'], tol=0.1)
129129
def test_collection():
130130
x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100))
131131
data = np.sin(x) + np.cos(y)

lib/matplotlib/tests/test_streamplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_startpoints():
3636

3737

3838
@image_comparison(baseline_images=['streamplot_colormap'],
39-
tol=0.002)
39+
tol=0.1)
4040
def test_colormap():
4141
X, Y, U, V = velocity_field()
4242
plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2,

lib/mpl_toolkits/tests/test_mplot3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ def test_alpha(self):
658658
@image_comparison(
659659
baseline_images=['voxels-xyz'],
660660
extensions=['png'],
661-
tol=0.01
661+
tol=0.02
662662
)
663663
def test_xyz(self):
664664
fig, ax = plt.subplots(subplot_kw={"projection": "3d"})

0 commit comments

Comments
 (0)