3fa499b
From 8b585994418d62cde4a525f4e6a14aeba42459f4 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
9046bbb
Subject: [PATCH 4/4] 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 ++--
9046bbb
 lib/matplotlib/tests/test_axes.py                           | 4 ++--
1dcb7af
 lib/matplotlib/tests/test_backends_interactive.py           | 2 +-
1dcb7af
 lib/matplotlib/tests/test_collections.py                    | 2 +-
e6f3591
 lib/matplotlib/tests/test_constrainedlayout.py              | 3 ++-
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_streamplot.py                     | 2 +-
1dcb7af
 lib/matplotlib/tests/test_units.py                          | 4 ++--
7424178
 .../tests/test_axisartist_grid_helper_curvelinear.py        | 4 ++--
e6f3591
 13 files changed, 22 insertions(+), 21 deletions(-)
8d68856
8d68856
diff --git a/lib/matplotlib/tests/test_arrow_patches.py b/lib/matplotlib/tests/test_arrow_patches.py
e6f3591
index a9409e2c1..9627b3569 100644
8d68856
--- a/lib/matplotlib/tests/test_arrow_patches.py
8d68856
+++ b/lib/matplotlib/tests/test_arrow_patches.py
e6f3591
@@ -67,7 +67,7 @@ def __prepare_fancyarrow_dpi_cor_test():
8d68856
 
e6f3591
 
e6f3591
 @image_comparison(['fancyarrow_dpi_cor_100dpi.png'], remove_text=True,
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
     """
e6f3591
@@ -82,7 +82,7 @@ def test_fancyarrow_dpi_cor_100dpi():
e6f3591
 
8d68856
 
e6f3591
 @image_comparison(['fancyarrow_dpi_cor_200dpi.png'], remove_text=True,
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
3fa499b
index de146a527..8574a95d2 100644
8d68856
--- a/lib/matplotlib/tests/test_axes.py
8d68856
+++ b/lib/matplotlib/tests/test_axes.py
e6f3591
@@ -407,7 +407,7 @@ def test_annotate_default_arrow():
1584487
     assert ann.arrow_patch is not None
1584487
 
1584487
 
e6f3591
-@image_comparison(['polar_axes'], style='default')
e6f3591
+@image_comparison(['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
3fa499b
@@ -3653,7 +3653,7 @@ def test_vertex_markers():
8d68856
 
e6f3591
 
e6f3591
 @image_comparison(['vline_hline_zorder', '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
 
69d38c5
diff --git a/lib/matplotlib/tests/test_backends_interactive.py b/lib/matplotlib/tests/test_backends_interactive.py
9046bbb
index ad23abe3f..7b9660f2b 100644
69d38c5
--- a/lib/matplotlib/tests/test_backends_interactive.py
69d38c5
+++ b/lib/matplotlib/tests/test_backends_interactive.py
9046bbb
@@ -104,7 +104,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
e6f3591
index 0983283ec..1b079aff1 100644
8d68856
--- a/lib/matplotlib/tests/test_collections.py
8d68856
+++ b/lib/matplotlib/tests/test_collections.py
e6f3591
@@ -439,7 +439,7 @@ def test_barb_limits():
8d68856
 
e6f3591
 
e6f3591
 @image_comparison(['EllipseCollection_test_image.png'], remove_text=True,
e6f3591
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
e6f3591
+                  tol=0.012)
8d68856
 def test_EllipseCollection():
8d68856
     # Test basic functionality
e6f3591
     fig, ax = plt.subplots()
1584487
diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
e6f3591
index 75311e70e..8de7b987d 100644
1584487
--- a/lib/matplotlib/tests/test_constrainedlayout.py
1584487
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
e6f3591
@@ -164,7 +164,8 @@ def test_constrained_layout9():
e6f3591
     fig.suptitle('Test Suptitle', fontsize=28)
1584487
 
1584487
 
e6f3591
-@image_comparison(['constrained_layout10.png'])
e6f3591
+@image_comparison(['constrained_layout10.png'],
e6f3591
+                  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
e6f3591
index ee67b4e41..c52a5b0f8 100644
8d68856
--- a/lib/matplotlib/tests/test_cycles.py
8d68856
+++ b/lib/matplotlib/tests/test_cycles.py
9046bbb
@@ -9,7 +9,7 @@ from cycler import cycler
8d68856
 
8d68856
 
e6f3591
 @image_comparison(['color_cycle_basic.png'], remove_text=True,
e6f3591
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
e6f3591
+                  tol=0.008)
8d68856
 def test_colorcycle_basic():
a6c4a06
     fig, ax = plt.subplots()
e6f3591
     ax.set_prop_cycle(cycler('color', ['r', 'g', 'y']))
e6f3591
@@ -26,7 +26,7 @@ def test_colorcycle_basic():
8d68856
 
8d68856
 
e6f3591
 @image_comparison(['marker_cycle.png', 'marker_cycle.png'], remove_text=True,
e6f3591
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
e6f3591
+                  tol=0.008)
8d68856
 def test_marker_cycle():
a6c4a06
     fig, ax = plt.subplots()
e6f3591
     ax.set_prop_cycle(cycler('c', ['r', 'g', 'y']) +
e6f3591
@@ -59,7 +59,7 @@ def test_marker_cycle():
8d68856
 
8d68856
 
e6f3591
 @image_comparison(['lineprop_cycle_basic.png'], remove_text=True,
e6f3591
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
e6f3591
+                  tol=0.009)
8d68856
 def test_linestylecycle_basic():
a6c4a06
     fig, ax = plt.subplots()
e6f3591
     ax.set_prop_cycle(cycler('ls', ['-', '--', ':']))
1584487
diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py
e6f3591
index a9e8dfade..322acd41e 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
 
e6f3591
 @image_comparison(['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
e6f3591
index 93cfbb260..122c884da 100644
8d68856
--- a/lib/matplotlib/tests/test_image.py
8d68856
+++ b/lib/matplotlib/tests/test_image.py
e6f3591
@@ -928,7 +928,7 @@ def test_imshow_endianess():
8d68856
 
8d68856
 
e6f3591
 @image_comparison(['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
e6f3591
index 71499da44..23cfcb873 100644
8d68856
--- a/lib/matplotlib/tests/test_legend.py
8d68856
+++ b/lib/matplotlib/tests/test_legend.py
e6f3591
@@ -106,7 +106,7 @@ def test_multiple_keys():
8d68856
 
8d68856
 
e6f3591
 @image_comparison(['rgba_alpha.png'], remove_text=True,
e6f3591
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
e6f3591
+                  tol=0.007)
8d68856
 def test_alpha_rgba():
8d68856
     import matplotlib.pyplot as plt
8d68856
 
e6f3591
@@ -117,7 +117,7 @@ def test_alpha_rgba():
8d68856
 
e6f3591
 
e6f3591
 @image_comparison(['rcparam_alpha.png'], remove_text=True,
e6f3591
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
e6f3591
+                  tol=0.007)
8d68856
 def test_alpha_rcparam():
8d68856
     import matplotlib.pyplot as plt
8d68856
 
e6f3591
@@ -145,7 +145,7 @@ def test_fancy():
8d68856
 
e6f3591
 
e6f3591
 @image_comparison(['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
e6f3591
index 0fad3cdf2..4d2599607 100644
8d68856
--- a/lib/matplotlib/tests/test_pickle.py
8d68856
+++ b/lib/matplotlib/tests/test_pickle.py
9046bbb
@@ -41,7 +41,7 @@ def test_simple():
8d68856
 
e6f3591
 
e6f3591
 @image_comparison(['multi_pickle.png'], remove_text=True, style='mpl20',
e6f3591
-                  tol={'aarch64': 0.082}.get(platform.machine(), 0.0))
e6f3591
+                  tol=0.082)
8d68856
 def test_complete():
1584487
     fig = plt.figure('Figure with a label?', figsize=(10, 6))
e6f3591
 
8d68856
diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py
e6f3591
index 1afc60543..dcac38102 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
 
e6f3591
 @image_comparison(['streamplot_linewidth'], remove_text=True, style='mpl20',
e6f3591
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
e6f3591
+                  tol=0.002)
8d68856
 def test_linewidth():
8d68856
     X, Y, U, V = velocity_field()
e6f3591
     speed = np.hypot(U, V)
8d68856
diff --git a/lib/matplotlib/tests/test_units.py b/lib/matplotlib/tests/test_units.py
e6f3591
index f14425144..fd8f26502 100644
8d68856
--- a/lib/matplotlib/tests/test_units.py
8d68856
+++ b/lib/matplotlib/tests/test_units.py
e6f3591
@@ -74,7 +74,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)
e6f3591
 @image_comparison(['plot_pint.png'], remove_text=False, style='mpl20',
e6f3591
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
e6f3591
+                  tol=0.003)
7424178
 def test_numpy_facade(quantity_converter):
e6f3591
     # use former defaults to match existing baseline image
e6f3591
     plt.rcParams['axes.formatter.limits'] = -7, 7
e6f3591
@@ -101,7 +101,7 @@ def test_numpy_facade(quantity_converter):
8d68856
 
8d68856
 # Tests gh-8908
e6f3591
 @image_comparison(['plot_masked_units.png'], remove_text=True, style='mpl20',
e6f3591
-                  tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
e6f3591
+                  tol=0.007)
8d68856
 def test_plot_masked_units():
8d68856
     data = np.linspace(-5, 5)
e6f3591
     data_masked = np.ma.array(data, mask=(data > -2) & (data < 2))
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
e6f3591
index 611908063..be11d7c6b 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
 
e6f3591
 @image_comparison(['custom_transform.png'], style='default',
e6f3591
-                  tol={'aarch64': 0.034}.get(platform.machine(), 0.03))
e6f3591
+                  tol=0.04)
7424178
 def test_custom_transform():
7424178
     class MyTransform(Transform):
7424178
         input_dims = 2
e6f3591
@@ -84,7 +84,7 @@ def test_custom_transform():
1584487
 
1584487
 
e6f3591
 @image_comparison(['polar_box.png'], style='default',
e6f3591
-                  tol={'aarch64': 0.04}.get(platform.machine(), 0.03))
e6f3591
+                  tol=0.04)
1584487
 def test_polar_box():
e6f3591
     # Remove this line when this test image is regenerated.
e6f3591
     plt.rcParams['text.kerning_factor'] = 6
8d68856
-- 
e6f3591
2.21.1
8d68856