[Python-modules-commits] [matplotlib] 12/17: Increase test tollerance
Sandro Tosi
morph at moszumanska.debian.org
Thu Jan 19 04:40:24 UTC 2017
This is an automated email from the git hooks/post-receive script.
morph pushed a commit to branch master
in repository matplotlib.
commit 3143116a701ee9039e385265cf854f9da669abac
Author: Sandro Tosi <morph at debian.org>
Date: Wed Jan 18 20:05:24 2017 -0500
Increase test tollerance
Patch taken from Fedora packaging:
http://pkgs.fedoraproject.org/cgit/rpms/python-matplotlib.git/plain/python-matplotlib-increase-tests-tolerance.patch
---
lib/matplotlib/testing/decorators.py | 2 +-
lib/matplotlib/tests/test_mathtext.py | 2 +-
lib/matplotlib/tests/test_patheffects.py | 2 +-
lib/matplotlib/tests/test_png.py | 2 +-
lib/matplotlib/tests/test_streamplot.py | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/matplotlib/testing/decorators.py b/lib/matplotlib/testing/decorators.py
index 5927ea8..43a46ae 100644
--- a/lib/matplotlib/testing/decorators.py
+++ b/lib/matplotlib/testing/decorators.py
@@ -266,7 +266,7 @@ class ImageComparisonTest(CleanupTest):
yield do_test, fignum, actual_fname, expected_fname
-def image_comparison(baseline_images=None, extensions=None, tol=0,
+def image_comparison(baseline_images=None, extensions=None, tol=0.306,
freetype_version=None, remove_text=False,
savefig_kwarg=None, style='classic'):
"""
diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py
index 3876298..6b652bd 100644
--- a/lib/matplotlib/tests/test_mathtext.py
+++ b/lib/matplotlib/tests/test_mathtext.py
@@ -158,7 +158,7 @@ for fonts, chars in font_test_specs:
def make_set(basename, fontset, tests, extensions=None):
def make_test(filename, test):
- @image_comparison(baseline_images=[filename], extensions=extensions)
+ @image_comparison(baseline_images=[filename], extensions=extensions, tol=0.310)
def single_test():
matplotlib.rcParams['mathtext.fontset'] = fontset
fig = plt.figure(figsize=(5.25, 0.75))
diff --git a/lib/matplotlib/tests/test_patheffects.py b/lib/matplotlib/tests/test_patheffects.py
index b5ce1a7..48379ff 100644
--- a/lib/matplotlib/tests/test_patheffects.py
+++ b/lib/matplotlib/tests/test_patheffects.py
@@ -110,7 +110,7 @@ def test_SimplePatchShadow_offset():
assert_equal(pe._offset, (4, 5))
- at image_comparison(baseline_images=['collection'], tol=0.015)
+ at image_comparison(baseline_images=['collection'], tol=0.083)
def test_collection():
x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100))
data = np.sin(x) + np.cos(y)
diff --git a/lib/matplotlib/tests/test_png.py b/lib/matplotlib/tests/test_png.py
index 590b395..dbf8779 100644
--- a/lib/matplotlib/tests/test_png.py
+++ b/lib/matplotlib/tests/test_png.py
@@ -17,7 +17,7 @@ on_win = (sys.platform == 'win32')
@image_comparison(baseline_images=['pngsuite'], extensions=['png'],
- tol=0.01 if on_win else 0)
+ tol=0.014)
def test_pngsuite():
dirname = os.path.join(
os.path.dirname(__file__),
diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py
index af48aec..c7b7004 100644
--- a/lib/matplotlib/tests/test_streamplot.py
+++ b/lib/matplotlib/tests/test_streamplot.py
@@ -18,7 +18,7 @@ def velocity_field():
@image_comparison(baseline_images=['streamplot_colormap'],
- tol=0.002)
+ tol=0.009)
def test_colormap():
X, Y, U, V = velocity_field()
plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/matplotlib.git
More information about the Python-modules-commits
mailing list