diff options
author | Stephan Hoyer <shoyer@google.com> | 2019-05-26 12:04:44 -0700 |
---|---|---|
committer | Stephan Hoyer <shoyer@google.com> | 2019-05-26 12:04:44 -0700 |
commit | 9216a1dd5391013bf0670bb3d9d07ef68c3b7d66 (patch) | |
tree | 99924c389973ffe0792f08cbd93730c5d10dd4fc /numpy/testing/tests | |
parent | 37df5e641f19d9e5221cb519532b6cc5647ebe53 (diff) | |
download | numpy-9216a1dd5391013bf0670bb3d9d07ef68c3b7d66.tar.gz |
MAINT: Fixes tests with __array_function__ disabled
Diffstat (limited to 'numpy/testing/tests')
-rw-r--r-- | numpy/testing/tests/test_utils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py index 643d143ee..f17a3ccd3 100644 --- a/numpy/testing/tests/test_utils.py +++ b/numpy/testing/tests/test_utils.py @@ -17,6 +17,7 @@ from numpy.testing import ( 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(object): @@ -179,6 +180,8 @@ 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): |