python-matplotlib/0004-Increase-some-tolerances-for-non-x86-arches.patch

267 lines
11 KiB
Diff
Raw Normal View History

2019-05-31 05:44:54 +00:00
From 559f45bb0334b2c920f288a2a010b11c0dba9a49 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
2018-03-31 07:28:44 +00:00
Date: Sat, 31 Mar 2018 00:33:37 -0400
2019-05-31 05:44:54 +00:00
Subject: [PATCH 4/4] Increase some tolerances for non-x86 arches.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
2018-08-17 21:37:11 +00:00
lib/matplotlib/tests/test_arrow_patches.py | 4 ++--
2019-05-31 05:44:54 +00:00
lib/matplotlib/tests/test_axes.py | 4 ++--
2018-08-17 21:37:11 +00:00
lib/matplotlib/tests/test_backends_interactive.py | 2 +-
lib/matplotlib/tests/test_collections.py | 2 +-
lib/matplotlib/tests/test_constrainedlayout.py | 2 +-
lib/matplotlib/tests/test_cycles.py | 6 +++---
lib/matplotlib/tests/test_figure.py | 2 +-
lib/matplotlib/tests/test_image.py | 2 +-
lib/matplotlib/tests/test_legend.py | 6 +++---
lib/matplotlib/tests/test_pickle.py | 2 +-
lib/matplotlib/tests/test_streamplot.py | 2 +-
lib/matplotlib/tests/test_units.py | 4 ++--
2018-10-31 06:47:13 +00:00
.../tests/test_axisartist_grid_helper_curvelinear.py | 4 ++--
2019-05-31 05:44:54 +00:00
13 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/lib/matplotlib/tests/test_arrow_patches.py b/lib/matplotlib/tests/test_arrow_patches.py
2019-05-31 05:44:54 +00:00
index de596a9e0..9f12effa6 100644
--- a/lib/matplotlib/tests/test_arrow_patches.py
+++ b/lib/matplotlib/tests/test_arrow_patches.py
2018-08-17 21:37:11 +00:00
@@ -69,7 +69,7 @@ def __prepare_fancyarrow_dpi_cor_test():
@image_comparison(baseline_images=['fancyarrow_dpi_cor_100dpi'],
2018-08-17 21:37:11 +00:00
remove_text=True, extensions=['png'],
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
+ tol=0.016,
savefig_kwarg=dict(dpi=100))
def test_fancyarrow_dpi_cor_100dpi():
"""
2018-08-17 21:37:11 +00:00
@@ -85,7 +85,7 @@ def test_fancyarrow_dpi_cor_100dpi():
@image_comparison(baseline_images=['fancyarrow_dpi_cor_200dpi'],
2018-08-17 21:37:11 +00:00
remove_text=True, extensions=['png'],
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
+ tol=0.019,
savefig_kwarg=dict(dpi=200))
def test_fancyarrow_dpi_cor_200dpi():
"""
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
2019-05-31 05:44:54 +00:00
index 1168ef983..ab553e29e 100644
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
2019-05-31 05:44:54 +00:00
@@ -395,7 +395,7 @@ def test_annotate_default_arrow():
2018-03-31 07:28:44 +00:00
assert ann.arrow_patch is not None
-@image_comparison(baseline_images=['polar_axes'], style='default')
+@image_comparison(baseline_images=['polar_axes'], style='default', tol=0.01)
def test_polar_annotations():
# you can specify the xypoint and the xytext in different
# positions and coordinate systems, and optionally turn on a
2019-05-31 05:44:54 +00:00
@@ -3502,7 +3502,7 @@ def test_vertex_markers():
@image_comparison(baseline_images=['vline_hline_zorder',
2018-08-17 21:37:11 +00:00
'errorbar_zorder'],
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
+ tol=0.02)
def test_eb_line_zorder():
2018-08-17 21:37:11 +00:00
x = list(range(10))
diff --git a/lib/matplotlib/tests/test_backends_interactive.py b/lib/matplotlib/tests/test_backends_interactive.py
2019-05-31 05:44:54 +00:00
index ad23abe3f..7b9660f2b 100644
--- a/lib/matplotlib/tests/test_backends_interactive.py
+++ b/lib/matplotlib/tests/test_backends_interactive.py
2019-05-31 05:44:54 +00:00
@@ -104,7 +104,7 @@ fig.canvas.mpl_connect("draw_event", lambda event: timer.start())
2018-08-17 21:37:11 +00:00
plt.show()
"""
-_test_timeout = 10 # Empirically, 1s is not enough on Travis.
+_test_timeout = 30 # Empirically, 1s is not enough on Travis.
@pytest.mark.parametrize("backend", _get_testable_interactive_backends())
diff --git a/lib/matplotlib/tests/test_collections.py b/lib/matplotlib/tests/test_collections.py
2019-05-31 05:44:54 +00:00
index c12ed7004..bc741678f 100644
--- a/lib/matplotlib/tests/test_collections.py
+++ b/lib/matplotlib/tests/test_collections.py
2018-08-17 21:37:11 +00:00
@@ -442,7 +442,7 @@ def test_barb_limits():
@image_comparison(baseline_images=['EllipseCollection_test_image'],
2018-08-17 21:37:11 +00:00
extensions=['png'],
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
+ tol=0.012,
remove_text=True)
def test_EllipseCollection():
# Test basic functionality
2018-03-31 07:28:44 +00:00
diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
2019-05-31 05:44:54 +00:00
index df3e5cf18..2d0d0f02a 100644
2018-03-31 07:28:44 +00:00
--- a/lib/matplotlib/tests/test_constrainedlayout.py
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
2018-08-17 21:37:11 +00:00
@@ -173,7 +173,7 @@ def test_constrained_layout9():
2018-03-31 07:28:44 +00:00
@image_comparison(baseline_images=['constrained_layout10'],
- extensions=['png'])
+ extensions=['png'], tol=0.01)
def test_constrained_layout10():
'Test for handling legend outside axis'
fig, axs = plt.subplots(2, 2, constrained_layout=True)
diff --git a/lib/matplotlib/tests/test_cycles.py b/lib/matplotlib/tests/test_cycles.py
2019-05-31 05:44:54 +00:00
index 1254f3c7c..cea1522de 100644
--- a/lib/matplotlib/tests/test_cycles.py
+++ b/lib/matplotlib/tests/test_cycles.py
2019-05-31 05:44:54 +00:00
@@ -9,7 +9,7 @@ from cycler import cycler
@image_comparison(baseline_images=['color_cycle_basic'], remove_text=True,
2018-08-17 21:37:11 +00:00
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
+ tol=0.008,
extensions=['png'])
def test_colorcycle_basic():
2018-08-14 01:27:10 +00:00
fig, ax = plt.subplots()
2019-05-31 05:44:54 +00:00
@@ -27,7 +27,7 @@ def test_colorcycle_basic():
@image_comparison(baseline_images=['marker_cycle', 'marker_cycle'],
2018-08-17 21:37:11 +00:00
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
+ tol=0.008,
remove_text=True, extensions=['png'])
def test_marker_cycle():
2018-08-14 01:27:10 +00:00
fig, ax = plt.subplots()
2019-05-31 05:44:54 +00:00
@@ -61,7 +61,7 @@ def test_marker_cycle():
@image_comparison(baseline_images=['lineprop_cycle_basic'], remove_text=True,
2018-08-17 21:37:11 +00:00
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
+ tol=0.009,
extensions=['png'])
def test_linestylecycle_basic():
2018-08-14 01:27:10 +00:00
fig, ax = plt.subplots()
2018-03-31 07:28:44 +00:00
diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py
2019-05-31 05:44:54 +00:00
index 6ecb3edbe..207659648 100644
2018-03-31 07:28:44 +00:00
--- a/lib/matplotlib/tests/test_figure.py
+++ b/lib/matplotlib/tests/test_figure.py
2018-08-17 21:37:11 +00:00
@@ -14,7 +14,7 @@ import pytest
2018-03-31 07:28:44 +00:00
2018-08-17 21:37:11 +00:00
@image_comparison(baseline_images=['figure_align_labels'],
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
+ tol=0.01)
2018-03-31 07:28:44 +00:00
def test_align_labels():
# Check the figure.align_labels() command
fig = plt.figure(tight_layout=True)
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py
2019-05-31 05:44:54 +00:00
index ae803000d..0091fc03f 100644
--- a/lib/matplotlib/tests/test_image.py
+++ b/lib/matplotlib/tests/test_image.py
2019-05-31 05:44:54 +00:00
@@ -810,7 +810,7 @@ def test_imshow_endianess():
@image_comparison(baseline_images=['imshow_masked_interpolation'],
2018-08-17 21:37:11 +00:00
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
+ tol=0.006,
remove_text=True, style='mpl20')
def test_imshow_masked_interpolation():
diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py
2019-05-31 05:44:54 +00:00
index b4bcecde8..227b654cc 100644
--- a/lib/matplotlib/tests/test_legend.py
+++ b/lib/matplotlib/tests/test_legend.py
2018-08-17 21:37:11 +00:00
@@ -108,7 +108,7 @@ def test_multiple_keys():
@image_comparison(baseline_images=['rgba_alpha'],
2018-08-17 21:37:11 +00:00
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
+ tol=0.007,
extensions=['png'], remove_text=True)
def test_alpha_rgba():
import matplotlib.pyplot as plt
2018-08-17 21:37:11 +00:00
@@ -120,7 +120,7 @@ def test_alpha_rgba():
@image_comparison(baseline_images=['rcparam_alpha'],
2018-08-17 21:37:11 +00:00
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
+ tol=0.007,
extensions=['png'], remove_text=True)
def test_alpha_rcparam():
import matplotlib.pyplot as plt
2018-08-17 21:37:11 +00:00
@@ -149,7 +149,7 @@ def test_fancy():
2018-08-17 21:37:11 +00:00
@image_comparison(baseline_images=['framealpha'], remove_text=True,
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
+ tol=0.018)
def test_framealpha():
x = np.linspace(1, 100, 100)
y = x
diff --git a/lib/matplotlib/tests/test_pickle.py b/lib/matplotlib/tests/test_pickle.py
2019-05-31 05:44:54 +00:00
index d8ee5ffa7..607c13346 100644
--- a/lib/matplotlib/tests/test_pickle.py
+++ b/lib/matplotlib/tests/test_pickle.py
2019-05-31 05:44:54 +00:00
@@ -41,7 +41,7 @@ def test_simple():
2018-03-31 07:28:44 +00:00
@image_comparison(baseline_images=['multi_pickle'],
extensions=['png'], remove_text=True,
2018-08-17 21:37:11 +00:00
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
+ tol=0.004,
style='mpl20')
def test_complete():
2018-03-31 07:28:44 +00:00
fig = plt.figure('Figure with a label?', figsize=(10, 6))
diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py
2019-05-31 05:44:54 +00:00
index 6007c9b9a..96d43a3e3 100644
--- a/lib/matplotlib/tests/test_streamplot.py
+++ b/lib/matplotlib/tests/test_streamplot.py
2018-08-17 21:37:11 +00:00
@@ -49,7 +49,7 @@ def test_colormap():
2018-08-17 21:37:11 +00:00
@image_comparison(baseline_images=['streamplot_linewidth'],
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
+ tol=0.002,
remove_text=True, style='mpl20')
def test_linewidth():
X, Y, U, V = velocity_field()
diff --git a/lib/matplotlib/tests/test_units.py b/lib/matplotlib/tests/test_units.py
2019-05-31 05:44:54 +00:00
index 7d0f38a70..ef21a166c 100644
--- a/lib/matplotlib/tests/test_units.py
+++ b/lib/matplotlib/tests/test_units.py
2019-05-31 05:44:54 +00:00
@@ -73,7 +73,7 @@ def quantity_converter():
# Tests that the conversion machinery works properly for classes that
# work as a facade over numpy arrays (like pint)
2018-08-17 21:37:11 +00:00
@image_comparison(baseline_images=['plot_pint'],
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
+ tol=0.003,
extensions=['png'], remove_text=False, style='mpl20')
2018-10-31 06:47:13 +00:00
def test_numpy_facade(quantity_converter):
# Register the class
2019-05-31 05:44:54 +00:00
@@ -98,7 +98,7 @@ def test_numpy_facade(quantity_converter):
# Tests gh-8908
2018-08-17 21:37:11 +00:00
@image_comparison(baseline_images=['plot_masked_units'],
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
+ tol=0.007,
extensions=['png'], remove_text=True, style='mpl20')
def test_plot_masked_units():
data = np.linspace(-5, 5)
2018-03-31 07:28:44 +00:00
diff --git a/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py b/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py
2018-10-31 06:47:13 +00:00
index 32e1c884d..741d197b5 100644
2018-03-31 07:28:44 +00:00
--- a/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py
+++ b/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py
2018-10-31 06:47:13 +00:00
@@ -17,7 +17,7 @@ from mpl_toolkits.axisartist.grid_helper_curvelinear import \
@image_comparison(baseline_images=['custom_transform'],
- extensions=['png'], style='default', tol=0.03)
+ extensions=['png'], style='default', tol=0.04)
def test_custom_transform():
class MyTransform(Transform):
input_dims = 2
2018-08-17 21:37:11 +00:00
@@ -85,7 +85,7 @@ def test_custom_transform():
2018-03-31 07:28:44 +00:00
@image_comparison(baseline_images=['polar_box'],
2018-08-17 21:37:11 +00:00
- tol={'aarch64': 0.04}.get(platform.machine(), 0.03),
+ tol=0.04,
extensions=['png'], style='default')
2018-03-31 07:28:44 +00:00
def test_polar_box():
fig = plt.figure(figsize=(5, 5))
--
2019-05-31 05:44:54 +00:00
2.21.0