summaryrefslogtreecommitdiff
path: root/numpy/testing/tests
diff options
context:
space:
mode:
authorEvgeni Burovski <evgeni@burovski.me>2015-11-15 07:48:20 +0000
committerEvgeni Burovski <evgeni@burovski.me>2015-11-16 15:59:19 +0000
commit70c5052a9f07025c236033cf629506bb38eb6d97 (patch)
tree0fcffcf204b9ad1f0c2c351e7ad74d5bce83286d /numpy/testing/tests
parentcf66c68c6a560c934f4a767934573c7f85dcb4ae (diff)
downloadnumpy-70c5052a9f07025c236033cf629506bb38eb6d97.tar.gz
ENH: testing: add SkipTest and KnownFailureException
* use SkipTest in numpy tests instead of importing it from nose * add a KnownFailureException as an alias for KnownFailureTest (the former is preferred, but the latter is kept for backcompat) * rename the KnownFailure nose plugin into KnownFailurePlugin, and keep the old name for backcompat
Diffstat (limited to 'numpy/testing/tests')
-rw-r--r--numpy/testing/tests/test_decorators.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/numpy/testing/tests/test_decorators.py b/numpy/testing/tests/test_decorators.py
index f8a5be672..7dbb5a828 100644
--- a/numpy/testing/tests/test_decorators.py
+++ b/numpy/testing/tests/test_decorators.py
@@ -1,7 +1,7 @@
from __future__ import division, absolute_import, print_function
-from numpy.testing import dec, assert_, assert_raises, run_module_suite
-from numpy.testing.noseclasses import KnownFailureTest
+from numpy.testing import (dec, assert_, assert_raises, run_module_suite,
+ SkipTest, KnownFailureException)
import nose
def test_slow():
@@ -40,7 +40,7 @@ def test_skip_functions_hardcoded():
f1('a')
except DidntSkipException:
raise Exception('Failed to skip')
- except nose.SkipTest:
+ except SkipTest:
pass
@dec.skipif(False)
@@ -51,7 +51,7 @@ def test_skip_functions_hardcoded():
f2('a')
except DidntSkipException:
pass
- except nose.SkipTest:
+ except SkipTest:
raise Exception('Skipped when not expected to')
@@ -68,7 +68,7 @@ def test_skip_functions_callable():
f1('a')
except DidntSkipException:
raise Exception('Failed to skip')
- except nose.SkipTest:
+ except SkipTest:
pass
@dec.skipif(skip_tester)
@@ -80,7 +80,7 @@ def test_skip_functions_callable():
f2('a')
except DidntSkipException:
pass
- except nose.SkipTest:
+ except SkipTest:
raise Exception('Skipped when not expected to')
@@ -93,7 +93,7 @@ def test_skip_generators_hardcoded():
try:
for j in g1(10):
pass
- except KnownFailureTest:
+ except KnownFailureException:
pass
else:
raise Exception('Failed to mark as known failure')
@@ -107,7 +107,7 @@ def test_skip_generators_hardcoded():
try:
for j in g2(10):
pass
- except KnownFailureTest:
+ except KnownFailureException:
raise Exception('Marked incorretly as known failure')
except DidntSkipException:
pass
@@ -126,7 +126,7 @@ def test_skip_generators_callable():
skip_flag = 'skip me!'
for j in g1(10):
pass
- except KnownFailureTest:
+ except KnownFailureException:
pass
else:
raise Exception('Failed to mark as known failure')
@@ -141,7 +141,7 @@ def test_skip_generators_callable():
skip_flag = 'do not skip'
for j in g2(10):
pass
- except KnownFailureTest:
+ except KnownFailureException:
raise Exception('Marked incorretly as known failure')
except DidntSkipException:
pass