69d38c5
From f4e678415e0f249d97fe20d07941127fc34a2d54 Mon Sep 17 00:00:00 2001
8d68856
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1584487
Date: Sat, 31 Mar 2018 00:33:37 -0400
1584487
Subject: [PATCH 3/3] Increase some tolerances for non-x86 arches.
8d68856
8d68856
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
8d68856
---
69d38c5
 lib/matplotlib/tests/test_arrow_patches.py                 | 4 ++--
69d38c5
 lib/matplotlib/tests/test_axes.py                          | 7 ++++---
69d38c5
 lib/matplotlib/tests/test_backends_interactive.py          | 2 +-
69d38c5
 lib/matplotlib/tests/test_collections.py                   | 2 +-
69d38c5
 lib/matplotlib/tests/test_constrainedlayout.py             | 2 +-
69d38c5
 lib/matplotlib/tests/test_cycles.py                        | 6 +++---
69d38c5
 lib/matplotlib/tests/test_figure.py                        | 2 +-
69d38c5
 lib/matplotlib/tests/test_image.py                         | 2 +-
69d38c5
 lib/matplotlib/tests/test_legend.py                        | 6 +++---
69d38c5
 lib/matplotlib/tests/test_pickle.py                        | 2 +-
69d38c5
 lib/matplotlib/tests/test_scale.py                         | 2 +-
69d38c5
 lib/matplotlib/tests/test_streamplot.py                    | 2 +-
69d38c5
 lib/matplotlib/tests/test_units.py                         | 4 ++--
69d38c5
 .../tests/test_axisartist_grid_helper_curvelinear.py       | 2 +-
69d38c5
 14 files changed, 23 insertions(+), 22 deletions(-)
8d68856
8d68856
diff --git a/lib/matplotlib/tests/test_arrow_patches.py b/lib/matplotlib/tests/test_arrow_patches.py
69d38c5
index 44f87c5..fb50ae7 100644
8d68856
--- a/lib/matplotlib/tests/test_arrow_patches.py
8d68856
+++ b/lib/matplotlib/tests/test_arrow_patches.py
1584487
@@ -68,7 +68,7 @@ def __prepare_fancyarrow_dpi_cor_test():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['fancyarrow_dpi_cor_100dpi'],
8d68856
-                  remove_text=True, extensions=['png'],
8d68856
+                  remove_text=True, extensions=['png'], tol=0.016,
8d68856
                   savefig_kwarg=dict(dpi=100))
8d68856
 def test_fancyarrow_dpi_cor_100dpi():
8d68856
     """
1584487
@@ -83,7 +83,7 @@ def test_fancyarrow_dpi_cor_100dpi():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['fancyarrow_dpi_cor_200dpi'],
8d68856
-                  remove_text=True, extensions=['png'],
8d68856
+                  remove_text=True, extensions=['png'], tol=0.019,
8d68856
                   savefig_kwarg=dict(dpi=200))
8d68856
 def test_fancyarrow_dpi_cor_200dpi():
8d68856
     """
8d68856
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
69d38c5
index 77ec92b..49a4d92 100644
8d68856
--- a/lib/matplotlib/tests/test_axes.py
8d68856
+++ b/lib/matplotlib/tests/test_axes.py
1584487
@@ -389,7 +389,7 @@ def test_annotate_default_arrow():
1584487
     assert ann.arrow_patch is not None
1584487
 
1584487
 
1584487
-@image_comparison(baseline_images=['polar_axes'], style='default')
1584487
+@image_comparison(baseline_images=['polar_axes'], style='default', tol=0.01)
1584487
 def test_polar_annotations():
1584487
     # you can specify the xypoint and the xytext in different
1584487
     # positions and coordinate systems, and optionally turn on a
1584487
@@ -3284,7 +3284,8 @@ def test_vertex_markers():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['vline_hline_zorder',
8d68856
-                                   'errorbar_zorder'])
8d68856
+                                   'errorbar_zorder'],
8d68856
+                  tol=0.02)
8d68856
 def test_eb_line_zorder():
8d68856
     x = list(xrange(10))
8d68856
 
1584487
@@ -5017,7 +5018,7 @@ def test_title_location_roundtrip():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=["loglog"], remove_text=True,
8d68856
-                  extensions=['png'])
8d68856
+                  extensions=['png'], tol=0.009)
8d68856
 def test_loglog():
8d68856
     fig, ax = plt.subplots()
8d68856
     x = np.arange(1, 11)
69d38c5
diff --git a/lib/matplotlib/tests/test_backends_interactive.py b/lib/matplotlib/tests/test_backends_interactive.py
69d38c5
index bd1cc5f..7d11f18 100644
69d38c5
--- a/lib/matplotlib/tests/test_backends_interactive.py
69d38c5
+++ b/lib/matplotlib/tests/test_backends_interactive.py
69d38c5
@@ -55,4 +55,4 @@ def test_backend(backend):
69d38c5
     environ["MPLBACKEND"] = backend
69d38c5
     proc = Popen([sys.executable, "-c", _test_script], env=environ)
69d38c5
     # Empirically, 1s is not enough on Travis.
69d38c5
-    assert proc.wait(timeout=10) == 0
69d38c5
+    assert proc.wait(timeout=30) == 0
8d68856
diff --git a/lib/matplotlib/tests/test_collections.py b/lib/matplotlib/tests/test_collections.py
69d38c5
index 291647d..6b623ef 100644
8d68856
--- a/lib/matplotlib/tests/test_collections.py
8d68856
+++ b/lib/matplotlib/tests/test_collections.py
1584487
@@ -443,7 +443,7 @@ def test_barb_limits():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['EllipseCollection_test_image'],
8d68856
-                  extensions=['png'],
8d68856
+                  extensions=['png'], tol=0.012,
8d68856
                   remove_text=True)
8d68856
 def test_EllipseCollection():
8d68856
     # Test basic functionality
1584487
diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
69d38c5
index 9c36fb2..3834e4e 100644
1584487
--- a/lib/matplotlib/tests/test_constrainedlayout.py
1584487
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
1584487
@@ -223,7 +223,7 @@ def test_constrained_layout9():
1584487
 
1584487
 
1584487
 @image_comparison(baseline_images=['constrained_layout10'],
1584487
-        extensions=['png'])
1584487
+        extensions=['png'], tol=0.01)
1584487
 def test_constrained_layout10():
1584487
     'Test for handling legend outside axis'
1584487
     fig, axs = plt.subplots(2, 2, constrained_layout=True)
8d68856
diff --git a/lib/matplotlib/tests/test_cycles.py b/lib/matplotlib/tests/test_cycles.py
69d38c5
index 95611f3..0a118b6 100644
8d68856
--- a/lib/matplotlib/tests/test_cycles.py
8d68856
+++ b/lib/matplotlib/tests/test_cycles.py
8d68856
@@ -10,7 +10,7 @@ from cycler import cycler
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['color_cycle_basic'], remove_text=True,
8d68856
-                  extensions=['png'])
8d68856
+                  extensions=['png'], tol=0.008)
8d68856
 def test_colorcycle_basic():
8d68856
     fig = plt.figure()
8d68856
     ax = fig.add_subplot(111)
8d68856
@@ -28,7 +28,7 @@ def test_colorcycle_basic():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['marker_cycle', 'marker_cycle'],
8d68856
-                  remove_text=True, extensions=['png'])
8d68856
+                  remove_text=True, extensions=['png'], tol=0.008)
8d68856
 def test_marker_cycle():
8d68856
     fig = plt.figure()
8d68856
     ax = fig.add_subplot(111)
8d68856
@@ -63,7 +63,7 @@ def test_marker_cycle():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['lineprop_cycle_basic'], remove_text=True,
8d68856
-                  extensions=['png'])
8d68856
+                  extensions=['png'], tol=0.009)
8d68856
 def test_linestylecycle_basic():
8d68856
     fig = plt.figure()
8d68856
     ax = fig.add_subplot(111)
1584487
diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py
69d38c5
index 229ce19..0e7a10d 100644
1584487
--- a/lib/matplotlib/tests/test_figure.py
1584487
+++ b/lib/matplotlib/tests/test_figure.py
1584487
@@ -14,7 +14,7 @@ import numpy as np
1584487
 import pytest
1584487
 
1584487
 
1584487
-@image_comparison(baseline_images=['figure_align_labels'])
1584487
+@image_comparison(baseline_images=['figure_align_labels'], tol=0.01)
1584487
 def test_align_labels():
1584487
     # Check the figure.align_labels() command
1584487
     fig = plt.figure(tight_layout=True)
8d68856
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py
69d38c5
index 26e3b4a..2c7cedf 100644
8d68856
--- a/lib/matplotlib/tests/test_image.py
8d68856
+++ b/lib/matplotlib/tests/test_image.py
1584487
@@ -784,7 +784,7 @@ def test_imshow_endianess():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['imshow_masked_interpolation'],
8d68856
-                  remove_text=True, style='mpl20')
8d68856
+                  remove_text=True, style='mpl20', tol=0.006)
8d68856
 def test_imshow_masked_interpolation():
8d68856
 
8d68856
     cm = copy(plt.get_cmap('viridis'))
8d68856
diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py
69d38c5
index 55b8adc..1784ff9 100644
8d68856
--- a/lib/matplotlib/tests/test_legend.py
8d68856
+++ b/lib/matplotlib/tests/test_legend.py
1584487
@@ -145,7 +145,7 @@ def test_multiple_keys():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['rgba_alpha'],
8d68856
-                  extensions=['png'], remove_text=True)
8d68856
+                  extensions=['png'], remove_text=True, tol=0.007)
8d68856
 def test_alpha_rgba():
8d68856
     import matplotlib.pyplot as plt
8d68856
 
1584487
@@ -156,7 +156,7 @@ def test_alpha_rgba():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['rcparam_alpha'],
8d68856
-                  extensions=['png'], remove_text=True)
8d68856
+                  extensions=['png'], remove_text=True, tol=0.007)
8d68856
 def test_alpha_rcparam():
8d68856
     import matplotlib.pyplot as plt
8d68856
 
1584487
@@ -183,7 +183,7 @@ def test_fancy():
8d68856
                ncol=2, shadow=True, title="My legend", numpoints=1)
8d68856
 
8d68856
 
8d68856
-@image_comparison(baseline_images=['framealpha'], remove_text=True)
8d68856
+@image_comparison(baseline_images=['framealpha'], remove_text=True, tol=0.018)
8d68856
 def test_framealpha():
8d68856
     x = np.linspace(1, 100, 100)
8d68856
     y = x
8d68856
diff --git a/lib/matplotlib/tests/test_pickle.py b/lib/matplotlib/tests/test_pickle.py
69d38c5
index 89a5a51..99051de 100644
8d68856
--- a/lib/matplotlib/tests/test_pickle.py
8d68856
+++ b/lib/matplotlib/tests/test_pickle.py
1584487
@@ -42,7 +42,7 @@ def test_simple():
8d68856
 
1584487
 @image_comparison(baseline_images=['multi_pickle'],
8d68856
                   extensions=['png'], remove_text=True,
1584487
-                  style='mpl20')
1584487
+                  style='mpl20', tol=0.004)
8d68856
 def test_complete():
1584487
     fig = plt.figure('Figure with a label?', figsize=(10, 6))
1584487
 
8d68856
diff --git a/lib/matplotlib/tests/test_scale.py b/lib/matplotlib/tests/test_scale.py
69d38c5
index c50a0a8..a33fccc 100644
8d68856
--- a/lib/matplotlib/tests/test_scale.py
8d68856
+++ b/lib/matplotlib/tests/test_scale.py
1584487
@@ -97,7 +97,7 @@ def test_logscale_transform_repr():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['logscale_nonpos_values'], remove_text=True,
8d68856
-                  extensions=['png'], style='mpl20')
8d68856
+                  extensions=['png'], style='mpl20', tol=0.008)
8d68856
 def test_logscale_nonpos_values():
8d68856
     np.random.seed(19680801)
8d68856
     xs = np.random.normal(size=int(1e3))
8d68856
diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py
69d38c5
index 81a51e7..b77fee2 100644
8d68856
--- a/lib/matplotlib/tests/test_streamplot.py
8d68856
+++ b/lib/matplotlib/tests/test_streamplot.py
8d68856
@@ -48,7 +48,7 @@ def test_colormap():
8d68856
     plt.colorbar()
8d68856
 
8d68856
 
8d68856
-@image_comparison(baseline_images=['streamplot_linewidth'])
8d68856
+@image_comparison(baseline_images=['streamplot_linewidth'], tol=0.002)
8d68856
 def test_linewidth():
8d68856
     X, Y, U, V = velocity_field()
8d68856
     speed = np.sqrt(U*U + V*V)
8d68856
diff --git a/lib/matplotlib/tests/test_units.py b/lib/matplotlib/tests/test_units.py
69d38c5
index 65c8da7..c69d1d5 100644
8d68856
--- a/lib/matplotlib/tests/test_units.py
8d68856
+++ b/lib/matplotlib/tests/test_units.py
1584487
@@ -43,7 +43,7 @@ class Quantity(object):
8d68856
 
8d68856
 # Tests that the conversion machinery works properly for classes that
8d68856
 # work as a facade over numpy arrays (like pint)
8d68856
-@image_comparison(baseline_images=['plot_pint'],
8d68856
+@image_comparison(baseline_images=['plot_pint'], tol=0.003,
8d68856
                   extensions=['png'], remove_text=False, style='mpl20')
8d68856
 def test_numpy_facade():
8d68856
     # Create an instance of the conversion interface and
1584487
@@ -87,7 +87,7 @@ def test_numpy_facade():
8d68856
 
8d68856
 
8d68856
 # Tests gh-8908
8d68856
-@image_comparison(baseline_images=['plot_masked_units'],
8d68856
+@image_comparison(baseline_images=['plot_masked_units'], tol=0.007,
8d68856
                   extensions=['png'], remove_text=True, style='mpl20')
8d68856
 def test_plot_masked_units():
8d68856
     data = np.linspace(-5, 5)
1584487
diff --git a/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py b/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py
69d38c5
index a7c6374..8fc5b25 100644
1584487
--- a/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py
1584487
+++ b/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py
1584487
@@ -91,7 +91,7 @@ def test_custom_transform():
1584487
 
1584487
 
1584487
 @image_comparison(baseline_images=['polar_box'],
1584487
-                  extensions=['png'], style='default', tol=0.03)
1584487
+                  extensions=['png'], style='default', tol=0.04)
1584487
 def test_polar_box():
1584487
     fig = plt.figure(figsize=(5, 5))
1584487
 
8d68856
-- 
69d38c5
2.17.1
8d68856