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

Skip to content

Commit 3b2ab9d

Browse files
committed
Merge pull request #6249 from jenshnielsen/adjusttolosx2
Adjust test tolerance to pass for me on OSX
2 parents b49bcf4 + 598dce8 commit 3b2ab9d

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
import warnings
3030
from matplotlib.cbook import IgnoredKeywordWarning
3131

32-
import sys
33-
on_win = (sys.platform == 'win32')
3432

3533
# Note: Some test cases are run twice: once normally and once with labeled data
3634
# These two must be defined in the same test function or need to have
@@ -2766,7 +2764,7 @@ def test_subplot_key_hash():
27662764
@image_comparison(baseline_images=['specgram_freqs',
27672765
'specgram_freqs_linear'],
27682766
remove_text=True, extensions=['png'],
2769-
tol=0.07 if on_win else 0.03)
2767+
tol=0.07)
27702768
def test_specgram_freqs():
27712769
'''test axes.specgram in default (psd) mode with sinusoidal stimuli'''
27722770
n = 10000
@@ -2867,7 +2865,7 @@ def test_specgram_noise():
28672865
@image_comparison(baseline_images=['specgram_magnitude_freqs',
28682866
'specgram_magnitude_freqs_linear'],
28692867
remove_text=True, extensions=['png'],
2870-
tol=0.07 if on_win else 0.03)
2868+
tol=0.07)
28712869
def test_specgram_magnitude_freqs():
28722870
'''test axes.specgram in magnitude mode with sinusoidal stimuli'''
28732871
n = 10000
@@ -2969,7 +2967,7 @@ def test_specgram_magnitude_noise():
29692967

29702968
@image_comparison(baseline_images=['specgram_angle_freqs'],
29712969
remove_text=True, extensions=['png'],
2972-
tol=0.007 if on_win else 0)
2970+
tol=0.007)
29732971
def test_specgram_angle_freqs():
29742972
'''test axes.specgram in angle mode with sinusoidal stimuli'''
29752973
n = 10000

lib/matplotlib/tests/test_patheffects.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
import mock
1818
from nose.tools import assert_equal
1919

20-
import sys
21-
on_win = (sys.platform == 'win32')
22-
2320

2421
@image_comparison(baseline_images=['patheffect1'], remove_text=True)
2522
def test_patheffect1():
@@ -113,7 +110,7 @@ def test_SimplePatchShadow_offset():
113110
assert_equal(pe._offset, (4, 5))
114111

115112

116-
@image_comparison(baseline_images=['collection'], tol=0.013 if on_win else 0)
113+
@image_comparison(baseline_images=['collection'], tol=0.015)
117114
def test_collection():
118115
x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100))
119116
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)