Skip to content

Commit fe89b41

Browse files
committed
TST: Restore some tolerances for some arch/platform-specific failures
The tolerance on these was increased in various PRs, with notes to reduce/remove them, so they were removed in matplotlib#30184, but should have been reverted to a smaller value. - `test_floating_axes.py::test_curvelinear4[png]` fails on macOS - `test_grid_helper_curvelinear.py::test_axis_direction[png]` fails on ARM and macOS - `test_grid_helper_curvelinear.py::test_polar_box[png]` fails on Windows, ARM, and macOS These fail on macOS; there's a tolerance on them already, they fail by just a small amount, so increase it. - `test_bbox_tight.py::test_bbox_inches_tight_suptile_legend[png]` - `test_patheffects.py::test_collection[png]` - `test_axes3d.py::test_scale3d_artists_log[png]`
1 parent e0913d4 commit fe89b41

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

lib/matplotlib/tests/test_bbox_tight.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_bbox_inches_tight(text_placeholders):
4747

4848
@image_comparison(['bbox_inches_tight_suptile_legend'],
4949
savefig_kwarg={'bbox_inches': 'tight'},
50-
tol=0 if platform.machine() == 'x86_64' else 0.022)
50+
tol=0 if platform.machine() == 'x86_64' else 0.024)
5151
def test_bbox_inches_tight_suptile_legend():
5252
plt.plot(np.arange(10), label='a straight line')
5353
plt.legend(bbox_to_anchor=(0.9, 1), loc='upper left')

lib/matplotlib/tests/test_patheffects.py

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

122122

123-
@image_comparison(['collection'], tol=0.03, style='mpl20')
123+
@image_comparison(['collection'], tol=0.032, style='mpl20')
124124
def test_collection():
125125
x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100))
126126
data = np.sin(x) + np.cos(y)

lib/mpl_toolkits/axisartist/tests/test_floating_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test_curvelinear3():
6363
l.set_clip_path(ax1.patch)
6464

6565

66-
@image_comparison(['curvelinear4.png'], style='mpl20')
66+
@image_comparison(['curvelinear4.png'], style='mpl20', tol=0.04)
6767
def test_curvelinear4():
6868
fig = plt.figure(figsize=(5, 5))
6969

lib/mpl_toolkits/axisartist/tests/test_grid_helper_curvelinear.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def inverted(self):
7878
ax1.grid(True)
7979

8080

81-
@image_comparison(['polar_box.png'], style='mpl20')
81+
@image_comparison(['polar_box.png'], style='mpl20', tol=0.04)
8282
def test_polar_box():
8383
plt.rcParams.update({"xtick.direction": "inout", "ytick.direction": "out"})
8484
fig = plt.figure(figsize=(5, 5))
@@ -138,7 +138,7 @@ def test_polar_box():
138138
ax1.grid(True)
139139

140140

141-
@image_comparison(['axis_direction.png'], style='mpl20')
141+
@image_comparison(['axis_direction.png'], style='mpl20', tol=0.04)
142142
def test_axis_direction():
143143
fig = plt.figure(figsize=(5, 5))
144144

lib/mpl_toolkits/mplot3d/tests/test_axes3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2878,7 +2878,7 @@ def _make_triangulation_data():
28782878

28792879

28802880
@mpl3d_image_comparison(['scale3d_artists_log.png'], style='mpl20',
2881-
remove_text=False, tol=0.03)
2881+
remove_text=False, tol=0.032)
28822882
def test_scale3d_artists_log():
28832883
"""Test all 3D artist types with log scale."""
28842884
fig = plt.figure(figsize=(16, 12))

0 commit comments

Comments
 (0)