From 6198616b25d50abc9aabbce6784c10aaa10b33ce Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Mon, 4 Apr 2016 12:39:39 -0600 Subject: MAINT: Remove nose.SkipTest import. This was only needed for Python 2.6 as it is available from unittest in later Python versions. --- numpy/testing/utils.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'numpy/testing/utils.py') diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py index 133330a12..9511e00be 100644 --- a/numpy/testing/utils.py +++ b/numpy/testing/utils.py @@ -13,6 +13,7 @@ from functools import partial import shutil import contextlib from tempfile import mkdtemp, mkstemp +from unittest.case import SkipTest from .nosetester import import_nose from numpy.core import float32, empty, arange, array_repr, ndarray @@ -38,20 +39,11 @@ class KnownFailureException(Exception): '''Raise this exception to mark a test as a known failing test.''' pass -KnownFailureTest = KnownFailureException # backwards compat - - -# nose.SkipTest is unittest.case.SkipTest -# import it into the namespace, so that it's available as np.testing.SkipTest -try: - from unittest.case import SkipTest -except ImportError: - # on py2.6 unittest.case is not available. Ask nose for a replacement. - SkipTest = import_nose().SkipTest - +KnownFailureTest = KnownFailureException # backwards compat verbose = 0 + def assert_(val, msg=''): """ Assert that works in release mode. -- cgit v1.2.1