diff options
| author | Evgeni Burovski <evgeni@burovski.me> | 2015-11-15 07:48:20 +0000 |
|---|---|---|
| committer | Evgeni Burovski <evgeni@burovski.me> | 2015-11-16 15:59:19 +0000 |
| commit | 70c5052a9f07025c236033cf629506bb38eb6d97 (patch) | |
| tree | 0fcffcf204b9ad1f0c2c351e7ad74d5bce83286d /numpy/lib/tests | |
| parent | cf66c68c6a560c934f4a767934573c7f85dcb4ae (diff) | |
| download | numpy-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/lib/tests')
| -rw-r--r-- | numpy/lib/tests/test__datasource.py | 8 | ||||
| -rw-r--r-- | numpy/lib/tests/test_format.py | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/numpy/lib/tests/test__datasource.py b/numpy/lib/tests/test__datasource.py index 090f71f67..f4bece352 100644 --- a/numpy/lib/tests/test__datasource.py +++ b/numpy/lib/tests/test__datasource.py @@ -7,7 +7,7 @@ from shutil import rmtree from numpy.compat import asbytes from numpy.testing import ( - run_module_suite, TestCase, assert_ + run_module_suite, TestCase, assert_, SkipTest ) import numpy.lib._datasource as datasource @@ -137,8 +137,7 @@ class TestDataSourceOpen(TestCase): import gzip except ImportError: # We don't have the gzip capabilities to test. - import nose - raise nose.SkipTest + raise SkipTest # Test datasource's internal file_opener for Gzip files. filepath = os.path.join(self.tmpdir, 'foobar.txt.gz') fp = gzip.open(filepath, 'w') @@ -154,8 +153,7 @@ class TestDataSourceOpen(TestCase): import bz2 except ImportError: # We don't have the bz2 capabilities to test. - import nose - raise nose.SkipTest + raise SkipTest # Test datasource's internal file_opener for BZip2 files. filepath = os.path.join(self.tmpdir, 'foobar.txt.bz2') fp = bz2.BZ2File(filepath, 'w') diff --git a/numpy/lib/tests/test_format.py b/numpy/lib/tests/test_format.py index 4f8a65148..1bf65fa61 100644 --- a/numpy/lib/tests/test_format.py +++ b/numpy/lib/tests/test_format.py @@ -287,7 +287,7 @@ import numpy as np from numpy.compat import asbytes, asbytes_nested, sixu from numpy.testing import ( run_module_suite, assert_, assert_array_equal, assert_raises, raises, - dec + dec, SkipTest ) from numpy.lib import format @@ -812,7 +812,6 @@ def test_bad_header(): def test_large_file_support(): - from nose import SkipTest if (sys.platform == 'win32' or sys.platform == 'cygwin'): raise SkipTest("Unknown if Windows has sparse filesystems") # try creating a large sparse file |
