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

Skip to content

Commit 9a74cd7

Browse files
committed
Merge pull request #6249 from jenshnielsen/adjusttolosx2
Adjust test tolerance to pass for me on OSX
1 parent 6db787f commit 9a74cd7

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import warnings
2929
from matplotlib.cbook import IgnoredKeywordWarning
3030

31+
3132
# Note: Some test cases are run twice: once normally and once with labeled data
3233
# These two must be defined in the same test function or need to have
3334
# different baseline images to prevent race conditions when nose runs
@@ -1792,11 +1793,11 @@ def test_boxplot_sym():
17921793
def test_boxplot_autorange_whiskers():
17931794
x = np.ones(140)
17941795
x = np.hstack([0, x, 2])
1795-
1796+
17961797
fig1, ax1 = plt.subplots()
17971798
ax1.boxplot([x, x], bootstrap=10000, notch=1)
17981799
ax1.set_ylim((-5, 5))
1799-
1800+
18001801
fig2, ax2 = plt.subplots()
18011802
ax2.boxplot([x, x], bootstrap=10000, notch=1, autorange=True)
18021803
ax2.set_ylim((-5, 5))
@@ -2759,7 +2760,7 @@ def test_subplot_key_hash():
27592760

27602761
@image_comparison(baseline_images=['specgram_freqs',
27612762
'specgram_freqs_linear'],
2762-
remove_text=True, extensions=['png'], tol=0.03)
2763+
remove_text=True, extensions=['png'], tol=0.07)
27632764
def test_specgram_freqs():
27642765
'''test axes.specgram in default (psd) mode with sinusoidal stimuli'''
27652766
n = 10000
@@ -2859,7 +2860,7 @@ def test_specgram_noise():
28592860

28602861
@image_comparison(baseline_images=['specgram_magnitude_freqs',
28612862
'specgram_magnitude_freqs_linear'],
2862-
remove_text=True, extensions=['png'], tol=0.03)
2863+
remove_text=True, extensions=['png'], tol=0.07)
28632864
def test_specgram_magnitude_freqs():
28642865
'''test axes.specgram in magnitude mode with sinusoidal stimuli'''
28652866
n = 10000
@@ -2960,7 +2961,7 @@ def test_specgram_magnitude_noise():
29602961

29612962

29622963
@image_comparison(baseline_images=['specgram_angle_freqs'],
2963-
remove_text=True, extensions=['png'])
2964+
remove_text=True, extensions=['png'], tol=0.007)
29642965
def test_specgram_angle_freqs():
29652966
'''test axes.specgram in angle mode with sinusoidal stimuli'''
29662967
n = 10000

lib/matplotlib/tests/test_patheffects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def test_SimplePatchShadow_offset():
110110
assert_equal(pe._offset, (4, 5))
111111

112112

113-
@image_comparison(baseline_images=['collection'])
113+
@image_comparison(baseline_images=['collection'], tol=0.015)
114114
def test_collection():
115115
x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100))
116116
data = np.sin(x) + np.cos(y)

lib/mpl_toolkits/tests/test_mplot3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def test_text3d():
149149
ax.set_zlabel('Z axis')
150150

151151

152-
@image_comparison(baseline_images=['trisurf3d'], remove_text=True)
152+
@image_comparison(baseline_images=['trisurf3d'], remove_text=True, tol=0.03)
153153
def test_trisurf3d():
154154
n_angles = 36
155155
n_radii = 8

0 commit comments

Comments
 (0)