From 3757f89663dfbefdeab074fbfad60cf879486ec4 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Mon, 23 May 2016 11:58:24 +0100 Subject: [PATCH] Skip test for Matplotlib <1.4 --- glue/tests/helpers.py | 6 +++++- glue/viewers/image/qt/tests/test_regression.py | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/glue/tests/helpers.py b/glue/tests/helpers.py index 2486616d3..94e516bd2 100644 --- a/glue/tests/helpers.py +++ b/glue/tests/helpers.py @@ -34,6 +34,10 @@ def make_skipper(module, label=None, version=None): label='Astropy >= 0.4', version='0.4') +MATPLOTLIB_GE_14_INSTALLED, requires_matplotlib_ge_14 = make_skipper('matplotlib', + label='Matplotlib >= 1.4', + version='1.4') + ASTRODENDRO_INSTALLED, requires_astrodendro = make_skipper('astrodendro') SCIPY_INSTALLED, requires_scipy = make_skipper('scipy', @@ -90,4 +94,4 @@ def make_file(contents, suffix, decompress=False): try: os.unlink(fname) except WindowsError: # on Windows the unlink can fail - pass \ No newline at end of file + pass diff --git a/glue/viewers/image/qt/tests/test_regression.py b/glue/viewers/image/qt/tests/test_regression.py index bc7e9d9bb..e6c4b6408 100644 --- a/glue/viewers/image/qt/tests/test_regression.py +++ b/glue/viewers/image/qt/tests/test_regression.py @@ -6,8 +6,10 @@ from glue.core import Data from glue.viewers.image.qt import ImageWidget from glue.core.tests.util import simple_session +from glue.tests.helpers import requires_matplotlib_ge_14 +@requires_matplotlib_ge_14 @pytest.mark.mpl_image_compare(tolerance=1, savefig_kwargs={'dpi': 50}) def test_resample_on_zoom():