Skip to content

Commit ad16cb6

Browse files
committed
Increase tolerance so subpixel issue doesn't cause test failure.
There are ten pixels that differ due to how the subpixel calculation is done.
1 parent eabfc26 commit ad16cb6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/matplotlib/tests/test_image.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,11 @@ def test_log_scale_image():
732732
ax.set(yscale='log')
733733

734734

735-
@image_comparison(['rotate_image'], remove_text=True)
735+
# Increased tolerance is needed for PDF test to avoid failure. After the PDF
736+
# backend was modified to use indexed color, there are ten pixels that differ
737+
# due to how the subpixel calculation is done when converting the PDF files to
738+
# PNG images.
739+
@image_comparison(['rotate_image'], remove_text=True, tol=0.35)
736740
def test_rotate_image():
737741
delta = 0.25
738742
x = y = np.arange(-3.0, 3.0, delta)

0 commit comments

Comments
 (0)