Increase some tolerances for 32-bit systems.

This commit is contained in:
Elliott Sales de Andrade
2017-10-15 18:16:56 -04:00
parent c9345fa6ce
commit 3f6380df61
10 changed files with 410 additions and 9 deletions
@@ -1,7 +1,7 @@
From 0420e360523e3452467bfc7d9bb19c3593cde2e7 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Thu, 5 Oct 2017 21:26:53 -0400
Subject: [PATCH 1/8] TST: Skip sphinxext if unavailable instead of error.
Subject: [PATCH 1/9] TST: Skip sphinxext if unavailable instead of error.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
+1 -1
View File
@@ -1,7 +1,7 @@
From 279f95dae9dcd74d51c5913254889712697d1d8a Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 6 Oct 2017 20:06:09 -0400
Subject: [PATCH 2/8] TST: Capture all internal warnings.
Subject: [PATCH 2/9] TST: Capture all internal warnings.
These are either deprecations, or checks for old, but probably
incorrect, behaviour.
@@ -1,7 +1,7 @@
From ee4253242cbaf972443ee49c59f056d8957f4f4f Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 6 Oct 2017 20:53:16 -0400
Subject: [PATCH 3/8] TST: Don't require LaTeX or Inkscape for nose tests.
Subject: [PATCH 3/9] TST: Don't require LaTeX or Inkscape for nose tests.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
@@ -1,7 +1,7 @@
From a95786dc8f982c8f7d212badad883754fe448c98 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sat, 7 Oct 2017 00:28:59 -0400
Subject: [PATCH 4/8] Fix AxesImage.get_cursor_data on arm.
Subject: [PATCH 4/9] Fix AxesImage.get_cursor_data on arm.
For some reason, NaN gets converted to 0 as an integer instead of
INT_MIN like on x86.
@@ -1,7 +1,7 @@
From aaab55ffee458dc867f3f51e2a9908c6885b7dec Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sat, 7 Oct 2017 05:40:35 -0400
Subject: [PATCH 5/8] TST: Use fuzzy comparison in test_psd_csd_equal.
Subject: [PATCH 5/9] TST: Use fuzzy comparison in test_psd_csd_equal.
Fixes #7158.
@@ -1,7 +1,7 @@
From 5b1c238764a6f594991459f2c269e41157edba2f Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sun, 15 Oct 2017 17:16:11 -0400
Subject: [PATCH 6/8] Use fuzzy comparison for stroke join determination.
Subject: [PATCH 6/9] Use fuzzy comparison for stroke join determination.
This sometimes produces something just slightly different from 0
compared to x86(_64).
+1 -1
View File
@@ -1,7 +1,7 @@
From 400b97c30de5aa45e48a26c552dc310a3c1cf758 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Wed, 27 Sep 2017 19:35:59 -0400
Subject: [PATCH 7/8] matplotlibrc path search fix
Subject: [PATCH 7/9] matplotlibrc path search fix
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
@@ -1,7 +1,7 @@
From ce6e4fd43193698df2168fa946be479e5f8b96ff Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sun, 15 Oct 2017 17:35:47 -0400
Subject: [PATCH 8/8] TST: Increase tolerances for FreeType 2.7.1.
Subject: [PATCH 8/9] TST: Increase tolerances for FreeType 2.7.1.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
@@ -0,0 +1,388 @@
From 7adef54248198dfff9cd74178b56a383d8ba40f8 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Sun, 15 Oct 2017 21:11:26 -0400
Subject: [PATCH 9/9] TST: Increase some tolerances for 32-bit systems.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
lib/matplotlib/tests/test_artist.py | 3 ++-
lib/matplotlib/tests/test_axes.py | 42 ++++++++++++++++----------------
lib/matplotlib/tests/test_collections.py | 2 +-
lib/matplotlib/tests/test_colorbar.py | 11 +++++----
lib/matplotlib/tests/test_contour.py | 6 ++---
lib/matplotlib/tests/test_image.py | 2 +-
lib/matplotlib/tests/test_pickle.py | 2 +-
lib/matplotlib/tests/test_quiver.py | 2 +-
lib/matplotlib/tests/test_transforms.py | 2 +-
lib/mpl_toolkits/tests/test_mplot3d.py | 2 +-
10 files changed, 38 insertions(+), 36 deletions(-)
diff --git a/lib/matplotlib/tests/test_artist.py b/lib/matplotlib/tests/test_artist.py
index 71b87e5af..151e58387 100644
--- a/lib/matplotlib/tests/test_artist.py
+++ b/lib/matplotlib/tests/test_artist.py
@@ -95,7 +95,8 @@ def test_collection_transform_of_none():
assert isinstance(c._transOffset, mtransforms.IdentityTransform)
-@image_comparison(baseline_images=["clip_path_clipping"], remove_text=True)
+@image_comparison(baseline_images=["clip_path_clipping"], remove_text=True,
+ tol=0.28)
def test_clipping():
exterior = mpath.Path.unit_rectangle().deepcopy()
exterior.vertices *= 4
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
index 4cf9cfa29..1cf0a00f2 100644
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -483,7 +483,7 @@ def test_single_point():
plt.plot('b', 'b', 'o', data=data)
-@image_comparison(baseline_images=['single_date'])
+@image_comparison(baseline_images=['single_date'], tol=1.97)
def test_single_date():
time1 = [721964.0]
data1 = [-65.54]
@@ -969,7 +969,7 @@ def test_fill_between_interpolate():
@image_comparison(baseline_images=['fill_between_interpolate_decreasing'],
- style='mpl20', remove_text=True)
+ style='mpl20', remove_text=True, tol=0.78)
def test_fill_between_interpolate_decreasing():
p = np.array([724.3, 700, 655])
t = np.array([9.4, 7, 2.2])
@@ -1083,7 +1083,7 @@ def test_pcolormesh():
@image_comparison(baseline_images=['pcolormesh_datetime_axis'],
- extensions=['png'], remove_text=False)
+ extensions=['png'], remove_text=False, tol=0.19)
def test_pcolormesh_datetime_axis():
fig = plt.figure()
fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)
@@ -1109,7 +1109,7 @@ def test_pcolormesh_datetime_axis():
@image_comparison(baseline_images=['pcolor_datetime_axis'],
- extensions=['png'], remove_text=False)
+ extensions=['png'], remove_text=False, tol=0.19)
def test_pcolor_datetime_axis():
fig = plt.figure()
fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)
@@ -1159,7 +1159,7 @@ def test_canonical():
@image_comparison(baseline_images=['arc_angles'], remove_text=True,
- style='default', extensions=['png'])
+ style='default', extensions=['png'], tol=0.17)
def test_arc_angles():
from matplotlib import patches
# Ellipse parameters
@@ -2396,7 +2396,7 @@ def test_boxplot_mod_artist_after_plotting():
@image_comparison(baseline_images=['violinplot_vert_baseline',
'violinplot_vert_baseline'],
- extensions=['png'])
+ extensions=['png'], tol=0.24)
def test_vert_violinplot_baseline():
# First 9 digits of frac(sqrt(2))
np.random.seed(414213562)
@@ -2414,7 +2414,7 @@ def test_vert_violinplot_baseline():
@image_comparison(baseline_images=['violinplot_vert_showmeans'],
- extensions=['png'])
+ extensions=['png'], tol=0.23)
def test_vert_violinplot_showmeans():
ax = plt.axes()
# First 9 digits of frac(sqrt(3))
@@ -2425,7 +2425,7 @@ def test_vert_violinplot_showmeans():
@image_comparison(baseline_images=['violinplot_vert_showextrema'],
- extensions=['png'])
+ extensions=['png'], tol=0.23)
def test_vert_violinplot_showextrema():
ax = plt.axes()
# First 9 digits of frac(sqrt(5))
@@ -2436,7 +2436,7 @@ def test_vert_violinplot_showextrema():
@image_comparison(baseline_images=['violinplot_vert_showmedians'],
- extensions=['png'])
+ extensions=['png'], tol=0.23)
def test_vert_violinplot_showmedians():
ax = plt.axes()
# First 9 digits of frac(sqrt(7))
@@ -2447,7 +2447,7 @@ def test_vert_violinplot_showmedians():
@image_comparison(baseline_images=['violinplot_vert_showall'],
- extensions=['png'])
+ extensions=['png'], tol=0.2)
def test_vert_violinplot_showall():
ax = plt.axes()
# First 9 digits of frac(sqrt(11))
@@ -2458,7 +2458,7 @@ def test_vert_violinplot_showall():
@image_comparison(baseline_images=['violinplot_vert_custompoints_10'],
- extensions=['png'])
+ extensions=['png'], tol=0.22)
def test_vert_violinplot_custompoints_10():
ax = plt.axes()
# First 9 digits of frac(sqrt(13))
@@ -2469,7 +2469,7 @@ def test_vert_violinplot_custompoints_10():
@image_comparison(baseline_images=['violinplot_vert_custompoints_200'],
- extensions=['png'])
+ extensions=['png'], tol=0.22)
def test_vert_violinplot_custompoints_200():
ax = plt.axes()
# First 9 digits of frac(sqrt(17))
@@ -2480,7 +2480,7 @@ def test_vert_violinplot_custompoints_200():
@image_comparison(baseline_images=['violinplot_horiz_baseline'],
- extensions=['png'])
+ extensions=['png'], tol=0.2)
def test_horiz_violinplot_baseline():
ax = plt.axes()
# First 9 digits of frac(sqrt(19))
@@ -2491,7 +2491,7 @@ def test_horiz_violinplot_baseline():
@image_comparison(baseline_images=['violinplot_horiz_showmedians'],
- extensions=['png'])
+ extensions=['png'], tol=0.23)
def test_horiz_violinplot_showmedians():
ax = plt.axes()
# First 9 digits of frac(sqrt(23))
@@ -2502,7 +2502,7 @@ def test_horiz_violinplot_showmedians():
@image_comparison(baseline_images=['violinplot_horiz_showmeans'],
- extensions=['png'])
+ extensions=['png'], tol=0.25)
def test_horiz_violinplot_showmeans():
ax = plt.axes()
# First 9 digits of frac(sqrt(29))
@@ -2513,7 +2513,7 @@ def test_horiz_violinplot_showmeans():
@image_comparison(baseline_images=['violinplot_horiz_showextrema'],
- extensions=['png'])
+ extensions=['png'], tol=0.2)
def test_horiz_violinplot_showextrema():
ax = plt.axes()
# First 9 digits of frac(sqrt(31))
@@ -2524,7 +2524,7 @@ def test_horiz_violinplot_showextrema():
@image_comparison(baseline_images=['violinplot_horiz_showall'],
- extensions=['png'])
+ extensions=['png'], tol=0.19)
def test_horiz_violinplot_showall():
ax = plt.axes()
# First 9 digits of frac(sqrt(37))
@@ -2535,7 +2535,7 @@ def test_horiz_violinplot_showall():
@image_comparison(baseline_images=['violinplot_horiz_custompoints_10'],
- extensions=['png'])
+ extensions=['png'], tol=0.22)
def test_horiz_violinplot_custompoints_10():
ax = plt.axes()
# First 9 digits of frac(sqrt(41))
@@ -2546,7 +2546,7 @@ def test_horiz_violinplot_custompoints_10():
@image_comparison(baseline_images=['violinplot_horiz_custompoints_200'],
- extensions=['png'])
+ extensions=['png'], tol=0.22)
def test_horiz_violinplot_custompoints_200():
ax = plt.axes()
# First 9 digits of frac(sqrt(43))
@@ -3872,7 +3872,7 @@ def test_psd_noise():
@image_comparison(baseline_images=['csd_freqs'], remove_text=True,
- extensions=['png'])
+ extensions=['png'], tol=0.21)
def test_csd_freqs():
'''test axes.csd with sinusoidal stimuli'''
n = 10000
@@ -5103,7 +5103,7 @@ def test_date_timezone_y():
@image_comparison(baseline_images=['date_timezone_x_and_y'],
- extensions=['png'])
+ extensions=['png'], tol=3.05)
def test_date_timezone_x_and_y():
# Tests issue 5575
time_index = [pytz.timezone('UTC').localize(datetime.datetime(
diff --git a/lib/matplotlib/tests/test_collections.py b/lib/matplotlib/tests/test_collections.py
index c27aeb11a..9d39a3e91 100644
--- a/lib/matplotlib/tests/test_collections.py
+++ b/lib/matplotlib/tests/test_collections.py
@@ -468,7 +468,7 @@ def test_EllipseCollection():
@image_comparison(baseline_images=['polycollection_close'],
- extensions=['png'], remove_text=True)
+ extensions=['png'], remove_text=True, tol=0.45)
def test_polycollection_close():
from mpl_toolkits.mplot3d import Axes3D
diff --git a/lib/matplotlib/tests/test_colorbar.py b/lib/matplotlib/tests/test_colorbar.py
index b75ba7e9f..cfbb16444 100644
--- a/lib/matplotlib/tests/test_colorbar.py
+++ b/lib/matplotlib/tests/test_colorbar.py
@@ -96,7 +96,7 @@ def _colorbar_extension_length(spacing):
@image_comparison(
baseline_images=['colorbar_extensions_shape_uniform',
'colorbar_extensions_shape_proportional'],
- extensions=['png'])
+ extensions=['png'], tol=0.16)
def test_colorbar_extension_shape():
'''Test rectangular colorbar extensions.'''
# Create figures for uniform and proportionally spaced colorbars.
@@ -106,7 +106,7 @@ def test_colorbar_extension_shape():
@image_comparison(baseline_images=['colorbar_extensions_uniform',
'colorbar_extensions_proportional'],
- extensions=['png'])
+ extensions=['png'], tol=0.25)
def test_colorbar_extension_length():
'''Test variable length colorbar extensions.'''
# Create figures for uniform and proportionally spaced colorbars.
@@ -120,7 +120,7 @@ def test_colorbar_extension_length():
'cbar_sharing',
],
extensions=['png'], remove_text=True,
- savefig_kwarg={'dpi': 40})
+ savefig_kwarg={'dpi': 40}, tol=0.17)
def test_colorbar_positioning():
data = np.arange(1200).reshape(30, 40)
levels = [0, 200, 400, 600, 800, 1000, 1200]
@@ -174,7 +174,7 @@ def test_colorbar_positioning():
@image_comparison(baseline_images=['cbar_with_subplots_adjust'],
extensions=['png'], remove_text=True,
- savefig_kwarg={'dpi': 40})
+ savefig_kwarg={'dpi': 40}, tol=0.17)
def test_gridspec_make_colorbar():
plt.figure()
data = np.arange(1200).reshape(30, 40)
@@ -234,7 +234,8 @@ def test_colorbarbase():
@image_comparison(
baseline_images=['colorbar_closed_patch'],
- remove_text=True)
+ remove_text=True,
+ tol=0.22)
def test_colorbar_closed_patch():
fig = plt.figure(figsize=(8, 6))
ax1 = fig.add_axes([0.05, 0.85, 0.9, 0.1])
diff --git a/lib/matplotlib/tests/test_contour.py b/lib/matplotlib/tests/test_contour.py
index 842bb908d..b50d71075 100644
--- a/lib/matplotlib/tests/test_contour.py
+++ b/lib/matplotlib/tests/test_contour.py
@@ -209,7 +209,7 @@ def test_given_colors_levels_and_extends():
@image_comparison(baseline_images=['contour_datetime_axis'],
- extensions=['png'], remove_text=False)
+ extensions=['png'], remove_text=False, tol=0.18)
def test_contour_datetime_axis():
fig = plt.figure()
fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)
@@ -235,7 +235,7 @@ def test_contour_datetime_axis():
@image_comparison(baseline_images=['contour_test_label_transforms'],
- extensions=['png'], remove_text=True)
+ extensions=['png'], remove_text=True, tol=0.74)
def test_labels():
# Adapted from pylab_examples example code: contour_demo.py
# see issues #2475, #2843, and #2818 for explanation
@@ -264,7 +264,7 @@ def test_labels():
@image_comparison(baseline_images=['contour_corner_mask_False',
'contour_corner_mask_True'],
- extensions=['png'], remove_text=True)
+ extensions=['png'], remove_text=True, tol=0.19)
def test_corner_mask():
n = 60
mask_level = 0.95
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py
index 6240dd219..a4b51c52d 100644
--- a/lib/matplotlib/tests/test_image.py
+++ b/lib/matplotlib/tests/test_image.py
@@ -748,7 +748,7 @@ def test_imshow_endianess():
@image_comparison(baseline_images=['imshow_masked_interpolation'],
- remove_text=True, style='mpl20')
+ remove_text=True, style='mpl20', tol=0.25)
def test_imshow_masked_interpolation():
cm = copy(plt.get_cmap('viridis'))
diff --git a/lib/matplotlib/tests/test_pickle.py b/lib/matplotlib/tests/test_pickle.py
index bd6ac6862..512f07948 100644
--- a/lib/matplotlib/tests/test_pickle.py
+++ b/lib/matplotlib/tests/test_pickle.py
@@ -43,7 +43,7 @@ def test_simple():
@image_comparison(baseline_images=['multi_pickle'],
extensions=['png'], remove_text=True,
- style='mpl20')
+ style='mpl20', tol=0.11)
def test_complete():
fig = plt.figure('Figure with a label?', figsize=(10, 6))
diff --git a/lib/matplotlib/tests/test_quiver.py b/lib/matplotlib/tests/test_quiver.py
index a0e1e674f..ede6bfc64 100644
--- a/lib/matplotlib/tests/test_quiver.py
+++ b/lib/matplotlib/tests/test_quiver.py
@@ -131,7 +131,7 @@ def test_quiver_key_pivot():
@image_comparison(baseline_images=['barbs_test_image'],
- extensions=['png'], remove_text=True)
+ extensions=['png'], remove_text=True, tol=0.11)
def test_barbs():
x = np.linspace(-5, 5, 5)
X, Y = np.meshgrid(x, x)
diff --git a/lib/matplotlib/tests/test_transforms.py b/lib/matplotlib/tests/test_transforms.py
index 8f19a50f3..2fbe41187 100644
--- a/lib/matplotlib/tests/test_transforms.py
+++ b/lib/matplotlib/tests/test_transforms.py
@@ -75,7 +75,7 @@ def test_external_transform_api():
@image_comparison(baseline_images=['pre_transform_data'],
- tol=0.08)
+ tol=0.15)
def test_pre_transform_plotting():
# a catch-all for as many as possible plot layouts which handle
# pre-transforming the data NOTE: The axis range is important in this
diff --git a/lib/mpl_toolkits/tests/test_mplot3d.py b/lib/mpl_toolkits/tests/test_mplot3d.py
index c13f3be2f..81a28aadb 100644
--- a/lib/mpl_toolkits/tests/test_mplot3d.py
+++ b/lib/mpl_toolkits/tests/test_mplot3d.py
@@ -198,7 +198,7 @@ def test_text3d():
ax.set_zlabel('Z axis')
-@image_comparison(baseline_images=['trisurf3d'], remove_text=True, tol=0.03)
+@image_comparison(baseline_images=['trisurf3d'], remove_text=True, tol=0.05)
def test_trisurf3d():
n_angles = 36
n_radii = 8
--
2.13.5
+14 -1
View File
@@ -75,6 +75,7 @@ Patch0006: 0006-Use-fuzzy-comparison-for-stroke-join-determination.patch
# Fedora-specific patches.
Patch1001: 0007-matplotlibrc-path-search-fix.patch
Patch1002: 0008-TST-Increase-tolerances-for-FreeType-2.7.1.patch
Patch1686: 0009-TST-Increase-some-tolerances-for-32-bit-systems.patch
BuildRequires: freetype-devel
BuildRequires: libpng-devel
@@ -386,7 +387,19 @@ Requires: python3-tkinter
%endif
%prep
%autosetup -n matplotlib-%{version}%{?rctag} -p1
%autosetup -n matplotlib-%{version}%{?rctag} -N
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch1001 -p1
%patch1002 -p1
%ifarch i686
# Switch to full autosetup when 32-bit systems are dropped.
%patch1686 -p1
%endif
rm -r extern/libqhull
# Copy setup.cfg to the builddir