b5e6655
From 179885bd9a442bc171e562a8997abde2824997fa 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
---
1dcb7af
 lib/matplotlib/tests/test_arrow_patches.py                  | 4 ++--
1dcb7af
 lib/matplotlib/tests/test_axes.py                           | 6 +++---
1dcb7af
 lib/matplotlib/tests/test_backends_interactive.py           | 2 +-
1dcb7af
 lib/matplotlib/tests/test_collections.py                    | 2 +-
1dcb7af
 lib/matplotlib/tests/test_constrainedlayout.py              | 2 +-
1dcb7af
 lib/matplotlib/tests/test_cycles.py                         | 6 +++---
1dcb7af
 lib/matplotlib/tests/test_figure.py                         | 2 +-
1dcb7af
 lib/matplotlib/tests/test_image.py                          | 2 +-
1dcb7af
 lib/matplotlib/tests/test_legend.py                         | 6 +++---
1dcb7af
 lib/matplotlib/tests/test_pickle.py                         | 2 +-
1dcb7af
 lib/matplotlib/tests/test_scale.py                          | 2 +-
1dcb7af
 lib/matplotlib/tests/test_streamplot.py                     | 2 +-
1dcb7af
 lib/matplotlib/tests/test_units.py                          | 4 ++--
7424178
 .../tests/test_axisartist_grid_helper_curvelinear.py        | 4 ++--
7424178
 14 files changed, 23 insertions(+), 23 deletions(-)
8d68856
8d68856
diff --git a/lib/matplotlib/tests/test_arrow_patches.py b/lib/matplotlib/tests/test_arrow_patches.py
1dcb7af
index f678fbed3..bac0cb802 100644
8d68856
--- a/lib/matplotlib/tests/test_arrow_patches.py
8d68856
+++ b/lib/matplotlib/tests/test_arrow_patches.py
1dcb7af
@@ -69,7 +69,7 @@ def __prepare_fancyarrow_dpi_cor_test():
8d68856
 
8d68856
 @image_comparison(baseline_images=['fancyarrow_dpi_cor_100dpi'],
1dcb7af
                   remove_text=True, extensions=['png'],
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  tol=0.016,
8d68856
                   savefig_kwarg=dict(dpi=100))
8d68856
 def test_fancyarrow_dpi_cor_100dpi():
8d68856
     """
1dcb7af
@@ -85,7 +85,7 @@ def test_fancyarrow_dpi_cor_100dpi():
8d68856
 
8d68856
 @image_comparison(baseline_images=['fancyarrow_dpi_cor_200dpi'],
1dcb7af
                   remove_text=True, extensions=['png'],
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  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
b5e6655
index c0e0e560d..0021bbda4 100644
8d68856
--- a/lib/matplotlib/tests/test_axes.py
8d68856
+++ b/lib/matplotlib/tests/test_axes.py
b5e6655
@@ -387,7 +387,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
b5e6655
@@ -3370,7 +3370,7 @@ def test_vertex_markers():
8d68856
 
8d68856
 @image_comparison(baseline_images=['vline_hline_zorder',
1dcb7af
                                    'errorbar_zorder'],
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
8d68856
+                  tol=0.02)
8d68856
 def test_eb_line_zorder():
1dcb7af
     x = list(range(10))
8d68856
 
b5e6655
@@ -5142,7 +5142,7 @@ def test_title_location_roundtrip():
8d68856
 
8d68856
 @image_comparison(baseline_images=["loglog"], remove_text=True,
1dcb7af
                   extensions=['png'],
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
1dcb7af
+                  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
f171297
index 00cbf5db9..33e6fb21a 100644
69d38c5
--- a/lib/matplotlib/tests/test_backends_interactive.py
69d38c5
+++ b/lib/matplotlib/tests/test_backends_interactive.py
f171297
@@ -105,7 +105,7 @@ fig.canvas.mpl_connect("draw_event", lambda event: timer.start())
1dcb7af
 
1dcb7af
 plt.show()
1dcb7af
 """
1dcb7af
-_test_timeout = 10  # Empirically, 1s is not enough on Travis.
1dcb7af
+_test_timeout = 30  # Empirically, 1s is not enough on Travis.
1dcb7af
 
1dcb7af
 
1dcb7af
 @pytest.mark.parametrize("backend", _get_testable_interactive_backends())
8d68856
diff --git a/lib/matplotlib/tests/test_collections.py b/lib/matplotlib/tests/test_collections.py
1dcb7af
index 6812ee1ad..582aabb5c 100644
8d68856
--- a/lib/matplotlib/tests/test_collections.py
8d68856
+++ b/lib/matplotlib/tests/test_collections.py
1dcb7af
@@ -442,7 +442,7 @@ def test_barb_limits():
8d68856
 
8d68856
 @image_comparison(baseline_images=['EllipseCollection_test_image'],
1dcb7af
                   extensions=['png'],
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  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
f171297
index de8161ea7..2af2d6a42 100644
1584487
--- a/lib/matplotlib/tests/test_constrainedlayout.py
1584487
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
1dcb7af
@@ -173,7 +173,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
1dcb7af
index 8184d3eee..73b0f216d 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,
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  tol=0.008,
1dcb7af
                   extensions=['png'])
8d68856
 def test_colorcycle_basic():
a6c4a06
     fig, ax = plt.subplots()
1dcb7af
@@ -28,7 +28,7 @@ def test_colorcycle_basic():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['marker_cycle', 'marker_cycle'],
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  tol=0.008,
1dcb7af
                   remove_text=True, extensions=['png'])
8d68856
 def test_marker_cycle():
a6c4a06
     fig, ax = plt.subplots()
1dcb7af
@@ -62,7 +62,7 @@ def test_marker_cycle():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['lineprop_cycle_basic'], remove_text=True,
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  tol=0.009,
1dcb7af
                   extensions=['png'])
8d68856
 def test_linestylecycle_basic():
a6c4a06
     fig, ax = plt.subplots()
1584487
diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py
b5e6655
index 4c688eb05..63f562770 100644
1584487
--- a/lib/matplotlib/tests/test_figure.py
1584487
+++ b/lib/matplotlib/tests/test_figure.py
1dcb7af
@@ -14,7 +14,7 @@ import pytest
1584487
 
1584487
 
1dcb7af
 @image_comparison(baseline_images=['figure_align_labels'],
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
1dcb7af
+                  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
b5e6655
index c0ffc061a..ca15df113 100644
8d68856
--- a/lib/matplotlib/tests/test_image.py
8d68856
+++ b/lib/matplotlib/tests/test_image.py
b5e6655
@@ -766,7 +766,7 @@ def test_imshow_endianess():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['imshow_masked_interpolation'],
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  tol=0.006,
1dcb7af
                   remove_text=True, style='mpl20')
8d68856
 def test_imshow_masked_interpolation():
8d68856
 
8d68856
diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py
d2fa026
index d508d6f41..9147ef336 100644
8d68856
--- a/lib/matplotlib/tests/test_legend.py
8d68856
+++ b/lib/matplotlib/tests/test_legend.py
1dcb7af
@@ -108,7 +108,7 @@ def test_multiple_keys():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['rgba_alpha'],
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  tol=0.007,
1dcb7af
                   extensions=['png'], remove_text=True)
8d68856
 def test_alpha_rgba():
8d68856
     import matplotlib.pyplot as plt
1dcb7af
@@ -120,7 +120,7 @@ def test_alpha_rgba():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['rcparam_alpha'],
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  tol=0.007,
1dcb7af
                   extensions=['png'], remove_text=True)
8d68856
 def test_alpha_rcparam():
8d68856
     import matplotlib.pyplot as plt
1dcb7af
@@ -149,7 +149,7 @@ def test_fancy():
8d68856
 
8d68856
 
1dcb7af
 @image_comparison(baseline_images=['framealpha'], remove_text=True,
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
1dcb7af
+                  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
1dcb7af
index 9cb806c6f..91774abfd 100644
8d68856
--- a/lib/matplotlib/tests/test_pickle.py
8d68856
+++ b/lib/matplotlib/tests/test_pickle.py
1dcb7af
@@ -44,7 +44,7 @@ def test_simple():
8d68856
 
1584487
 @image_comparison(baseline_images=['multi_pickle'],
8d68856
                   extensions=['png'], remove_text=True,
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  tol=0.004,
1dcb7af
                   style='mpl20')
8d68856
 def test_complete():
1584487
     fig = plt.figure('Figure with a label?', figsize=(10, 6))
8d68856
diff --git a/lib/matplotlib/tests/test_scale.py b/lib/matplotlib/tests/test_scale.py
1dcb7af
index ebe5c4de9..2999b624d 100644
8d68856
--- a/lib/matplotlib/tests/test_scale.py
8d68856
+++ b/lib/matplotlib/tests/test_scale.py
1dcb7af
@@ -99,7 +99,7 @@ def test_logscale_transform_repr():
8d68856
 
8d68856
 
8d68856
 @image_comparison(baseline_images=['logscale_nonpos_values'], remove_text=True,
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  tol=0.008,
1dcb7af
                   extensions=['png'], style='mpl20')
8d68856
 def test_logscale_nonpos_values():
8d68856
     np.random.seed(19680801)
8d68856
diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py
1dcb7af
index e261513df..c8c8faf99 100644
8d68856
--- a/lib/matplotlib/tests/test_streamplot.py
8d68856
+++ b/lib/matplotlib/tests/test_streamplot.py
1dcb7af
@@ -49,7 +49,7 @@ def test_colormap():
8d68856
 
8d68856
 
1dcb7af
 @image_comparison(baseline_images=['streamplot_linewidth'],
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  tol=0.002,
1dcb7af
                   remove_text=True, style='mpl20')
8d68856
 def test_linewidth():
8d68856
     X, Y, U, V = velocity_field()
8d68856
diff --git a/lib/matplotlib/tests/test_units.py b/lib/matplotlib/tests/test_units.py
7424178
index fec498af3..12a8d8a3e 100644
8d68856
--- a/lib/matplotlib/tests/test_units.py
8d68856
+++ b/lib/matplotlib/tests/test_units.py
7424178
@@ -75,7 +75,7 @@ def quantity_converter():
8d68856
 # Tests that the conversion machinery works properly for classes that
8d68856
 # work as a facade over numpy arrays (like pint)
1dcb7af
 @image_comparison(baseline_images=['plot_pint'],
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  tol=0.003,
8d68856
                   extensions=['png'], remove_text=False, style='mpl20')
7424178
 def test_numpy_facade(quantity_converter):
7424178
     # Register the class
7424178
@@ -100,7 +100,7 @@ def test_numpy_facade(quantity_converter):
8d68856
 
8d68856
 # Tests gh-8908
1dcb7af
 @image_comparison(baseline_images=['plot_masked_units'],
1dcb7af
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
1dcb7af
+                  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
7424178
index 32e1c884d..741d197b5 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
7424178
@@ -17,7 +17,7 @@ from mpl_toolkits.axisartist.grid_helper_curvelinear import \
7424178
 
7424178
 
7424178
 @image_comparison(baseline_images=['custom_transform'],
7424178
-                  extensions=['png'], style='default', tol=0.03)
7424178
+                  extensions=['png'], style='default', tol=0.04)
7424178
 def test_custom_transform():
7424178
     class MyTransform(Transform):
7424178
         input_dims = 2
1dcb7af
@@ -85,7 +85,7 @@ def test_custom_transform():
1584487
 
1584487
 
1584487
 @image_comparison(baseline_images=['polar_box'],
1dcb7af
-                  tol={'aarch64': 0.04}.get(platform.machine(), 0.03),
1dcb7af
+                  tol=0.04,
1dcb7af
                   extensions=['png'], style='default')
1584487
 def test_polar_box():
1584487
     fig = plt.figure(figsize=(5, 5))
8d68856
-- 
b5e6655
2.20.1
8d68856