Skip to content

Commit 1276205

Browse files
committed
TST: Increase tolerances for Ghostscript 10.06
- `test_bbox_inches_tight_raster` differs by a single pixel in the middle of the line - `test_interp_nearest_vs_none` shifts the middle of the image over one pixel, causing a line of differences
1 parent 652012d commit 1276205

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/matplotlib/tests/test_bbox_tight.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def test_bbox_inches_tight_clipping():
110110
plt.gcf().artists.append(patch)
111111

112112

113-
@image_comparison(['bbox_inches_tight_raster'],
113+
@image_comparison(['bbox_inches_tight_raster'], tol=0.15, # For Ghostscript 10.06+.
114114
remove_text=True, savefig_kwarg={'bbox_inches': 'tight'})
115115
def test_bbox_inches_tight_raster():
116116
"""Test rasterization with tight_layout"""

lib/matplotlib/tests/test_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_alpha_interp():
3636
axr.imshow(img, interpolation="bilinear")
3737

3838

39-
@image_comparison(['interp_nearest_vs_none'],
39+
@image_comparison(['interp_nearest_vs_none'], tol=3.7, # For Ghostscript 10.06+.
4040
extensions=['pdf', 'svg'], remove_text=True)
4141
def test_interp_nearest_vs_none():
4242
"""Test the effect of "nearest" and "none" interpolation"""

0 commit comments

Comments
 (0)