2020-03-18 07:28:30 +00:00
|
|
|
From 8b585994418d62cde4a525f4e6a14aeba42459f4 Mon Sep 17 00:00:00 2001
|
2018-01-24 08:02:57 +00:00
|
|
|
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.
|
2018-01-24 08:02:57 +00:00
|
|
|
|
|
|
|
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 +-
|
2020-03-04 04:05:13 +00:00
|
|
|
lib/matplotlib/tests/test_constrainedlayout.py | 3 ++-
|
2018-08-17 21:37:11 +00:00
|
|
|
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 ++--
|
2020-03-04 04:05:13 +00:00
|
|
|
13 files changed, 22 insertions(+), 21 deletions(-)
|
2018-01-24 08:02:57 +00:00
|
|
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_arrow_patches.py b/lib/matplotlib/tests/test_arrow_patches.py
|
2020-03-04 04:05:13 +00:00
|
|
|
index a9409e2c1..9627b3569 100644
|
2018-01-24 08:02:57 +00:00
|
|
|
--- a/lib/matplotlib/tests/test_arrow_patches.py
|
|
|
|
+++ b/lib/matplotlib/tests/test_arrow_patches.py
|
2020-03-04 04:05:13 +00:00
|
|
|
@@ -67,7 +67,7 @@ def __prepare_fancyarrow_dpi_cor_test():
|
2018-01-24 08:02:57 +00:00
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
|
|
|
|
@image_comparison(['fancyarrow_dpi_cor_100dpi.png'], remove_text=True,
|
2018-08-17 21:37:11 +00:00
|
|
|
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
|
|
|
|
+ tol=0.016,
|
2018-01-24 08:02:57 +00:00
|
|
|
savefig_kwarg=dict(dpi=100))
|
|
|
|
def test_fancyarrow_dpi_cor_100dpi():
|
|
|
|
"""
|
2020-03-04 04:05:13 +00:00
|
|
|
@@ -82,7 +82,7 @@ def test_fancyarrow_dpi_cor_100dpi():
|
|
|
|
|
2018-01-24 08:02:57 +00:00
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
@image_comparison(['fancyarrow_dpi_cor_200dpi.png'], remove_text=True,
|
2018-08-17 21:37:11 +00:00
|
|
|
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
|
|
|
|
+ tol=0.019,
|
2018-01-24 08:02:57 +00:00
|
|
|
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
|
2020-03-18 07:28:30 +00:00
|
|
|
index de146a527..8574a95d2 100644
|
2018-01-24 08:02:57 +00:00
|
|
|
--- a/lib/matplotlib/tests/test_axes.py
|
|
|
|
+++ b/lib/matplotlib/tests/test_axes.py
|
2020-03-04 04:05:13 +00:00
|
|
|
@@ -407,7 +407,7 @@ def test_annotate_default_arrow():
|
2018-03-31 07:28:44 +00:00
|
|
|
assert ann.arrow_patch is not None
|
|
|
|
|
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
-@image_comparison(['polar_axes'], style='default')
|
|
|
|
+@image_comparison(['polar_axes'], style='default', tol=0.01)
|
2018-03-31 07:28:44 +00:00
|
|
|
def test_polar_annotations():
|
|
|
|
# you can specify the xypoint and the xytext in different
|
|
|
|
# positions and coordinate systems, and optionally turn on a
|
2020-03-18 07:28:30 +00:00
|
|
|
@@ -3653,7 +3653,7 @@ def test_vertex_markers():
|
2018-01-24 08:02:57 +00:00
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
|
|
|
|
@image_comparison(['vline_hline_zorder', 'errorbar_zorder'],
|
2018-08-17 21:37:11 +00:00
|
|
|
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
|
2018-01-24 08:02:57 +00:00
|
|
|
+ tol=0.02)
|
|
|
|
def test_eb_line_zorder():
|
2018-08-17 21:37:11 +00:00
|
|
|
x = list(range(10))
|
2018-01-24 08:02:57 +00:00
|
|
|
|
2018-06-22 07:50:26 +00:00
|
|
|
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
|
2018-06-22 07:50:26 +00:00
|
|
|
--- 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())
|
2018-01-24 08:02:57 +00:00
|
|
|
diff --git a/lib/matplotlib/tests/test_collections.py b/lib/matplotlib/tests/test_collections.py
|
2020-03-04 04:05:13 +00:00
|
|
|
index 0983283ec..1b079aff1 100644
|
2018-01-24 08:02:57 +00:00
|
|
|
--- a/lib/matplotlib/tests/test_collections.py
|
|
|
|
+++ b/lib/matplotlib/tests/test_collections.py
|
2020-03-04 04:05:13 +00:00
|
|
|
@@ -439,7 +439,7 @@ def test_barb_limits():
|
2018-01-24 08:02:57 +00:00
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
|
|
|
|
@image_comparison(['EllipseCollection_test_image.png'], remove_text=True,
|
|
|
|
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
|
|
|
|
+ tol=0.012)
|
2018-01-24 08:02:57 +00:00
|
|
|
def test_EllipseCollection():
|
|
|
|
# Test basic functionality
|
2020-03-04 04:05:13 +00:00
|
|
|
fig, ax = plt.subplots()
|
2018-03-31 07:28:44 +00:00
|
|
|
diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
|
2020-03-04 04:05:13 +00:00
|
|
|
index 75311e70e..8de7b987d 100644
|
2018-03-31 07:28:44 +00:00
|
|
|
--- a/lib/matplotlib/tests/test_constrainedlayout.py
|
|
|
|
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
|
2020-03-04 04:05:13 +00:00
|
|
|
@@ -164,7 +164,8 @@ def test_constrained_layout9():
|
|
|
|
fig.suptitle('Test Suptitle', fontsize=28)
|
2018-03-31 07:28:44 +00:00
|
|
|
|
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
-@image_comparison(['constrained_layout10.png'])
|
|
|
|
+@image_comparison(['constrained_layout10.png'],
|
|
|
|
+ tol=0.01)
|
2018-03-31 07:28:44 +00:00
|
|
|
def test_constrained_layout10():
|
|
|
|
'Test for handling legend outside axis'
|
|
|
|
fig, axs = plt.subplots(2, 2, constrained_layout=True)
|
2018-01-24 08:02:57 +00:00
|
|
|
diff --git a/lib/matplotlib/tests/test_cycles.py b/lib/matplotlib/tests/test_cycles.py
|
2020-03-04 04:05:13 +00:00
|
|
|
index ee67b4e41..c52a5b0f8 100644
|
2018-01-24 08:02:57 +00:00
|
|
|
--- 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
|
2018-01-24 08:02:57 +00:00
|
|
|
|
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
@image_comparison(['color_cycle_basic.png'], remove_text=True,
|
|
|
|
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
|
|
|
|
+ tol=0.008)
|
2018-01-24 08:02:57 +00:00
|
|
|
def test_colorcycle_basic():
|
2018-08-14 01:27:10 +00:00
|
|
|
fig, ax = plt.subplots()
|
2020-03-04 04:05:13 +00:00
|
|
|
ax.set_prop_cycle(cycler('color', ['r', 'g', 'y']))
|
|
|
|
@@ -26,7 +26,7 @@ def test_colorcycle_basic():
|
2018-01-24 08:02:57 +00:00
|
|
|
|
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
@image_comparison(['marker_cycle.png', 'marker_cycle.png'], remove_text=True,
|
|
|
|
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
|
|
|
|
+ tol=0.008)
|
2018-01-24 08:02:57 +00:00
|
|
|
def test_marker_cycle():
|
2018-08-14 01:27:10 +00:00
|
|
|
fig, ax = plt.subplots()
|
2020-03-04 04:05:13 +00:00
|
|
|
ax.set_prop_cycle(cycler('c', ['r', 'g', 'y']) +
|
|
|
|
@@ -59,7 +59,7 @@ def test_marker_cycle():
|
2018-01-24 08:02:57 +00:00
|
|
|
|
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
@image_comparison(['lineprop_cycle_basic.png'], remove_text=True,
|
|
|
|
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
|
|
|
|
+ tol=0.009)
|
2018-01-24 08:02:57 +00:00
|
|
|
def test_linestylecycle_basic():
|
2018-08-14 01:27:10 +00:00
|
|
|
fig, ax = plt.subplots()
|
2020-03-04 04:05:13 +00:00
|
|
|
ax.set_prop_cycle(cycler('ls', ['-', '--', ':']))
|
2018-03-31 07:28:44 +00:00
|
|
|
diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py
|
2020-03-04 04:05:13 +00:00
|
|
|
index a9e8dfade..322acd41e 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
|
|
|
|
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
@image_comparison(['figure_align_labels'],
|
2018-08-17 21:37:11 +00:00
|
|
|
- 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)
|
2018-01-24 08:02:57 +00:00
|
|
|
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py
|
2020-03-04 04:05:13 +00:00
|
|
|
index 93cfbb260..122c884da 100644
|
2018-01-24 08:02:57 +00:00
|
|
|
--- a/lib/matplotlib/tests/test_image.py
|
|
|
|
+++ b/lib/matplotlib/tests/test_image.py
|
2020-03-04 04:05:13 +00:00
|
|
|
@@ -928,7 +928,7 @@ def test_imshow_endianess():
|
2018-01-24 08:02:57 +00:00
|
|
|
|
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
@image_comparison(['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')
|
2018-01-24 08:02:57 +00:00
|
|
|
def test_imshow_masked_interpolation():
|
|
|
|
|
|
|
|
diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py
|
2020-03-04 04:05:13 +00:00
|
|
|
index 71499da44..23cfcb873 100644
|
2018-01-24 08:02:57 +00:00
|
|
|
--- a/lib/matplotlib/tests/test_legend.py
|
|
|
|
+++ b/lib/matplotlib/tests/test_legend.py
|
2020-03-04 04:05:13 +00:00
|
|
|
@@ -106,7 +106,7 @@ def test_multiple_keys():
|
2018-01-24 08:02:57 +00:00
|
|
|
|
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
@image_comparison(['rgba_alpha.png'], remove_text=True,
|
|
|
|
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
|
|
|
|
+ tol=0.007)
|
2018-01-24 08:02:57 +00:00
|
|
|
def test_alpha_rgba():
|
|
|
|
import matplotlib.pyplot as plt
|
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
@@ -117,7 +117,7 @@ def test_alpha_rgba():
|
2018-01-24 08:02:57 +00:00
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
|
|
|
|
@image_comparison(['rcparam_alpha.png'], remove_text=True,
|
|
|
|
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
|
|
|
|
+ tol=0.007)
|
2018-01-24 08:02:57 +00:00
|
|
|
def test_alpha_rcparam():
|
|
|
|
import matplotlib.pyplot as plt
|
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
@@ -145,7 +145,7 @@ def test_fancy():
|
2018-01-24 08:02:57 +00:00
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
|
|
|
|
@image_comparison(['framealpha'], remove_text=True,
|
2018-08-17 21:37:11 +00:00
|
|
|
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
|
|
|
|
+ tol=0.018)
|
2018-01-24 08:02:57 +00:00
|
|
|
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
|
2020-03-04 04:05:13 +00:00
|
|
|
index 0fad3cdf2..4d2599607 100644
|
2018-01-24 08:02:57 +00:00
|
|
|
--- 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-01-24 08:02:57 +00:00
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
|
|
|
|
@image_comparison(['multi_pickle.png'], remove_text=True, style='mpl20',
|
|
|
|
- tol={'aarch64': 0.082}.get(platform.machine(), 0.0))
|
|
|
|
+ tol=0.082)
|
2018-01-24 08:02:57 +00:00
|
|
|
def test_complete():
|
2018-03-31 07:28:44 +00:00
|
|
|
fig = plt.figure('Figure with a label?', figsize=(10, 6))
|
2020-03-04 04:05:13 +00:00
|
|
|
|
2018-01-24 08:02:57 +00:00
|
|
|
diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py
|
2020-03-04 04:05:13 +00:00
|
|
|
index 1afc60543..dcac38102 100644
|
2018-01-24 08:02:57 +00:00
|
|
|
--- 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-01-24 08:02:57 +00:00
|
|
|
|
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
@image_comparison(['streamplot_linewidth'], remove_text=True, style='mpl20',
|
|
|
|
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
|
|
|
|
+ tol=0.002)
|
2018-01-24 08:02:57 +00:00
|
|
|
def test_linewidth():
|
|
|
|
X, Y, U, V = velocity_field()
|
2020-03-04 04:05:13 +00:00
|
|
|
speed = np.hypot(U, V)
|
2018-01-24 08:02:57 +00:00
|
|
|
diff --git a/lib/matplotlib/tests/test_units.py b/lib/matplotlib/tests/test_units.py
|
2020-03-04 04:05:13 +00:00
|
|
|
index f14425144..fd8f26502 100644
|
2018-01-24 08:02:57 +00:00
|
|
|
--- a/lib/matplotlib/tests/test_units.py
|
|
|
|
+++ b/lib/matplotlib/tests/test_units.py
|
2020-03-04 04:05:13 +00:00
|
|
|
@@ -74,7 +74,7 @@ def quantity_converter():
|
2018-01-24 08:02:57 +00:00
|
|
|
# Tests that the conversion machinery works properly for classes that
|
|
|
|
# work as a facade over numpy arrays (like pint)
|
2020-03-04 04:05:13 +00:00
|
|
|
@image_comparison(['plot_pint.png'], remove_text=False, style='mpl20',
|
|
|
|
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
|
|
|
|
+ tol=0.003)
|
2018-10-31 06:47:13 +00:00
|
|
|
def test_numpy_facade(quantity_converter):
|
2020-03-04 04:05:13 +00:00
|
|
|
# use former defaults to match existing baseline image
|
|
|
|
plt.rcParams['axes.formatter.limits'] = -7, 7
|
|
|
|
@@ -101,7 +101,7 @@ def test_numpy_facade(quantity_converter):
|
2018-01-24 08:02:57 +00:00
|
|
|
|
|
|
|
# Tests gh-8908
|
2020-03-04 04:05:13 +00:00
|
|
|
@image_comparison(['plot_masked_units.png'], remove_text=True, style='mpl20',
|
|
|
|
- tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
|
|
|
|
+ tol=0.007)
|
2018-01-24 08:02:57 +00:00
|
|
|
def test_plot_masked_units():
|
|
|
|
data = np.linspace(-5, 5)
|
2020-03-04 04:05:13 +00:00
|
|
|
data_masked = np.ma.array(data, mask=(data > -2) & (data < 2))
|
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
|
2020-03-04 04:05:13 +00:00
|
|
|
index 611908063..be11d7c6b 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 \
|
|
|
|
|
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
@image_comparison(['custom_transform.png'], style='default',
|
|
|
|
- tol={'aarch64': 0.034}.get(platform.machine(), 0.03))
|
|
|
|
+ tol=0.04)
|
2018-10-31 06:47:13 +00:00
|
|
|
def test_custom_transform():
|
|
|
|
class MyTransform(Transform):
|
|
|
|
input_dims = 2
|
2020-03-04 04:05:13 +00:00
|
|
|
@@ -84,7 +84,7 @@ def test_custom_transform():
|
2018-03-31 07:28:44 +00:00
|
|
|
|
|
|
|
|
2020-03-04 04:05:13 +00:00
|
|
|
@image_comparison(['polar_box.png'], style='default',
|
|
|
|
- tol={'aarch64': 0.04}.get(platform.machine(), 0.03))
|
|
|
|
+ tol=0.04)
|
2018-03-31 07:28:44 +00:00
|
|
|
def test_polar_box():
|
2020-03-04 04:05:13 +00:00
|
|
|
# Remove this line when this test image is regenerated.
|
|
|
|
plt.rcParams['text.kerning_factor'] = 6
|
2018-01-24 08:02:57 +00:00
|
|
|
--
|
2020-03-04 04:05:13 +00:00
|
|
|
2.21.1
|
2018-01-24 08:02:57 +00:00
|
|
|
|