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/test__datasource.py | |
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/test__datasource.py')
-rw-r--r-- | numpy/lib/tests/test__datasource.py | 8 |
1 files changed, 3 insertions, 5 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') |