From d69f7803484ae179ade02ae4bee39620fe6000d9 Mon Sep 17 00:00:00 2001 From: Alan Saul Date: Wed, 15 Nov 2017 14:24:08 +0000 Subject: [PATCH 1/4] Trying to fix tests for Matplotlib plotting issue --- GPy/testing/plotting_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPy/testing/plotting_tests.py b/GPy/testing/plotting_tests.py index dce8b91a..c08ff17e 100644 --- a/GPy/testing/plotting_tests.py +++ b/GPy/testing/plotting_tests.py @@ -38,7 +38,7 @@ from nose import SkipTest try: import matplotlib - matplotlib.use('agg') + #matplotlib.use('agg') except ImportError: # matplotlib not installed from nose import SkipTest From 4d1b8c28669c6d9bcf75ebbad581b4f4e40adc23 Mon Sep 17 00:00:00 2001 From: Alan Saul Date: Wed, 15 Nov 2017 15:34:42 +0000 Subject: [PATCH 2/4] Testing Again #575 --- GPy/testing/plotting_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPy/testing/plotting_tests.py b/GPy/testing/plotting_tests.py index c08ff17e..a9faa183 100644 --- a/GPy/testing/plotting_tests.py +++ b/GPy/testing/plotting_tests.py @@ -42,7 +42,7 @@ try: except ImportError: # matplotlib not installed from nose import SkipTest - raise SkipTest("Skipping Matplotlib testing") + raise from unittest.case import TestCase From 328f29a6f074d9db267d134ef8cb946c4bf482ed Mon Sep 17 00:00:00 2001 From: Alan Saul Date: Wed, 15 Nov 2017 16:30:27 +0000 Subject: [PATCH 3/4] Figured it must be a matplotlib import error #575 New import matplotlib must be missing a package --- GPy/testing/plotting_tests.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/GPy/testing/plotting_tests.py b/GPy/testing/plotting_tests.py index a9faa183..93301832 100644 --- a/GPy/testing/plotting_tests.py +++ b/GPy/testing/plotting_tests.py @@ -38,11 +38,11 @@ from nose import SkipTest try: import matplotlib - #matplotlib.use('agg') + matplotlib.use('agg') except ImportError: # matplotlib not installed from nose import SkipTest - raise + raise SkipTest("Error importing matplotlib") from unittest.case import TestCase @@ -70,7 +70,8 @@ try: from matplotlib.testing.compare import compare_images from matplotlib.testing.noseclasses import ImageComparisonFailure except ImportError: - raise SkipTest("Matplotlib not installed, not testing plots") + raise + # raise SkipTest("Matplotlib not installed, not testing plots") extensions = ['npz'] From 88d4a46b67fb5c50273237092f49de50c6c7dddc Mon Sep 17 00:00:00 2001 From: Alan Saul Date: Wed, 15 Nov 2017 18:19:32 +0000 Subject: [PATCH 4/4] Removed ImageComparisonFailure #575 ImageComparisonFailure no longer exists which causes issues with travis testing using the most recent matplotlib --- GPy/testing/plotting_tests.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/GPy/testing/plotting_tests.py b/GPy/testing/plotting_tests.py index 93301832..a80ccf48 100644 --- a/GPy/testing/plotting_tests.py +++ b/GPy/testing/plotting_tests.py @@ -68,10 +68,8 @@ if config.get('plotting', 'library') != 'matplotlib': try: from matplotlib import cbook, pyplot as plt from matplotlib.testing.compare import compare_images - from matplotlib.testing.noseclasses import ImageComparisonFailure except ImportError: - raise - # raise SkipTest("Matplotlib not installed, not testing plots") + raise SkipTest("Matplotlib not installed, not testing plots") extensions = ['npz']