From 43db8794206736c0e8e1f735972521aaba99991a Mon Sep 17 00:00:00 2001 From: Matteo Giantomassi Date: Mon, 16 Oct 2017 11:40:07 +0200 Subject: [PATCH] Disable mayavi and iwidgets tests on Travis --- abipy/core/testing.py | 4 ++++ tests/test_scripts.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/abipy/core/testing.py b/abipy/core/testing.py index 43862613..9fedb081 100644 --- a/abipy/core/testing.py +++ b/abipy/core/testing.py @@ -318,6 +318,8 @@ class AbipyTest(PymatgenTest): """ True if Mayavi is available. Set also offscreen to True """ + # Disable mayavi for the time being. + return False # This to run mayavi tests only on Travis if not os.environ.get("TRAVIS"): return False try: @@ -372,6 +374,8 @@ class AbipyTest(PymatgenTest): @staticmethod def has_ipywidgets(): """Return True if ipywidgets is available.""" + # Disable widget tests on TRAVIS + if os.environ.get("TRAVIS"): return False try: import ipywidgets as ipw return True diff --git a/tests/test_scripts.py b/tests/test_scripts.py index 52e88187..7fded721 100644 --- a/tests/test_scripts.py +++ b/tests/test_scripts.py @@ -2,6 +2,7 @@ """Test abipy command line scripts.""" from __future__ import print_function, division, unicode_literals, absolute_import +import sys import os import abipy.data as abidata import abipy.flowtk as flowtk @@ -34,6 +35,8 @@ class ScriptTest(AbipyTest): loglevel = "--loglevel=ERROR" verbose = "-vv" + # Don’t raise an exception if anything is printed to stderr + #if sys.version_info[0] <= 2 else str(s) expect_stderr = True # else tests fail due to warnings and deprecation messages def get_env(self, check_help_version=True):