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

Skip to content

Commit 8d44f75

Browse files
committed
tests: Removed existing custom tolerance values, since they are irrelevant under the new algorithm.
Added a few new tolerance values, for output I am seeing that is valid but slightly different to the baseline image.
1 parent 64ae6c8 commit 8d44f75

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def test_imshow():
501501

502502
ax.imshow(r)
503503

504-
@image_comparison(baseline_images=['imshow_clip'], tol=100)
504+
@image_comparison(baseline_images=['imshow_clip'])
505505
def test_imshow_clip():
506506
# As originally reported by Gellule Xg <[email protected]>
507507

lib/matplotlib/tests/test_backend_pgf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def compare_figure(fname):
5757

5858
expected = os.path.join(result_dir, "expected_%s" % fname)
5959
shutil.copyfile(os.path.join(baseline_dir, fname), expected)
60-
err = compare_images(expected, actual, tol=50)
60+
err = compare_images(expected, actual)
6161
if err:
6262
raise ImageComparisonFailure('images not close: %s vs. %s' % (actual, expected))
6363

lib/matplotlib/tests/test_bbox_tight.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import numpy as np
55

66
@image_comparison(baseline_images=['bbox_inches_tight'], remove_text=True,
7-
savefig_kwarg=dict(bbox_inches='tight'))
7+
savefig_kwarg=dict(bbox_inches='tight'), tol=15)
88
def test_bbox_inches_tight():
99
"Test that a figure saved using bbox_inches'tight' is clipped right"
1010
rcParams.update(rcParamsDefault)

lib/matplotlib/tests/test_image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_interp_nearest_vs_none():
5656
ax2.set_title('interpolation nearest')
5757

5858

59-
@image_comparison(baseline_images=['figimage-0', 'figimage-1'], extensions=['png'], tol=15)
59+
@image_comparison(baseline_images=['figimage-0', 'figimage-1'], extensions=['png'])
6060
def test_figimage():
6161
'test the figimage method'
6262

@@ -159,7 +159,7 @@ def test_image_clip():
159159

160160
im = ax.imshow(d, extent=(-pi,pi,-pi/2,pi/2))
161161

162-
@image_comparison(baseline_images=['imshow'], tol=15, remove_text=True)
162+
@image_comparison(baseline_images=['imshow'], remove_text=True)
163163
def test_imshow():
164164
import numpy as np
165165
import matplotlib.pyplot as plt

lib/matplotlib/tests/test_legend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import matplotlib.pyplot as plt
55
import matplotlib as mpl
66

7-
@image_comparison(baseline_images=['legend_auto1'], tol=15, remove_text=True)
7+
@image_comparison(baseline_images=['legend_auto1'], remove_text=True)
88
def test_legend_auto1():
99
'Test automatic legend placement'
1010
fig = plt.figure()

lib/matplotlib/tests/test_mathtext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
def make_set(basename, fontset, tests, extensions=None):
141141
def make_test(filename, test):
142142
@image_comparison(baseline_images=[filename], extensions=extensions,
143-
freetype_version=('2.4.5', '2.4.9'))
143+
freetype_version=('2.4.5', '2.4.9'), tol=50)
144144
def single_test():
145145
matplotlib.rcParams['mathtext.fontset'] = fontset
146146
fig = plt.figure(figsize=(5.25, 0.75))

lib/matplotlib/tests/test_simplification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_clipping():
2828
ax.plot(t, s, linewidth=1.0)
2929
ax.set_ylim((-0.20, -0.28))
3030

31-
@image_comparison(baseline_images=['overflow'], tol=100, remove_text=True)
31+
@image_comparison(baseline_images=['overflow'], remove_text=True)
3232
def test_overflow():
3333
x = np.array([1.0,2.0,3.0,2.0e5])
3434
y = np.arange(len(x))

0 commit comments

Comments
 (0)