summaryrefslogtreecommitdiff
path: root/numpy/testing/tests/test_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/testing/tests/test_utils.py')
-rw-r--r--numpy/testing/tests/test_utils.py40
1 files changed, 1 insertions, 39 deletions
diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py
index 052cc3aa1..0aaa508ee 100644
--- a/numpy/testing/tests/test_utils.py
+++ b/numpy/testing/tests/test_utils.py
@@ -8,13 +8,12 @@ import weakref
import numpy as np
from numpy.testing import (
assert_equal, assert_array_equal, assert_almost_equal,
- assert_array_almost_equal, assert_array_less, build_err_msg, raises,
+ assert_array_almost_equal, assert_array_less, build_err_msg,
assert_raises, assert_warns, assert_no_warnings, assert_allclose,
assert_approx_equal, assert_array_almost_equal_nulp, assert_array_max_ulp,
clear_and_catch_warnings, suppress_warnings, assert_string_equal, assert_,
tempdir, temppath, assert_no_gc_cycles, HAS_REFCOUNT
)
-from numpy.core.overrides import ARRAY_FUNCTION_ENABLED
class _GenericTest:
@@ -191,8 +190,6 @@ class TestArrayEqual(_GenericTest):
self._test_not_equal(a, b)
self._test_not_equal(b, a)
- @pytest.mark.skipif(
- not ARRAY_FUNCTION_ENABLED, reason='requires __array_function__')
def test_subclass_that_does_not_implement_npall(self):
class MyArray(np.ndarray):
def __array_function__(self, *args, **kwargs):
@@ -793,41 +790,6 @@ class TestArrayAssertLess:
self._assert_func(-ainf, x)
-@pytest.mark.skip(reason="The raises decorator depends on Nose")
-class TestRaises:
-
- def setup_method(self):
- class MyException(Exception):
- pass
-
- self.e = MyException
-
- def raises_exception(self, e):
- raise e
-
- def does_not_raise_exception(self):
- pass
-
- def test_correct_catch(self):
- raises(self.e)(self.raises_exception)(self.e) # raises?
-
- def test_wrong_exception(self):
- try:
- raises(self.e)(self.raises_exception)(RuntimeError) # raises?
- except RuntimeError:
- return
- else:
- raise AssertionError("should have caught RuntimeError")
-
- def test_catch_no_raise(self):
- try:
- raises(self.e)(self.does_not_raise_exception)() # raises?
- except AssertionError:
- return
- else:
- raise AssertionError("should have raised an AssertionError")
-
-
class TestWarns:
def test_warn(self):