summaryrefslogtreecommitdiff
path: root/numpy/testing/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r--numpy/testing/utils.py14
1 files changed, 3 insertions, 11 deletions
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.