diff options
author | Nathan Goldbaum <nathan.goldbaum@gmail.com> | 2023-01-02 06:31:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-02 14:31:32 +0100 |
commit | 2123658da0333c67236515082e43a6a2db156f7d (patch) | |
tree | 9fccfd104d11ab6d4050d792f343442606b354fe /numpy/testing | |
parent | e7ef28371eaeb0cc883af8c1e602ae1d0fade178 (diff) | |
download | numpy-2123658da0333c67236515082e43a6a2db156f7d.tar.gz |
BUG: Fixes for numpy.testing.overrides (#22879)
Followup for gh-22533. Adds a missing return statement to get_overridable_numpy_ufuncs (oops!) and imports numpy.testing.overrides into numpy.testing so e.g. tab completion on numpy.testing works for overrides.
Diffstat (limited to 'numpy/testing')
-rw-r--r-- | numpy/testing/__init__.py | 5 | ||||
-rw-r--r-- | numpy/testing/overrides.py | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/numpy/testing/__init__.py b/numpy/testing/__init__.py index 087527e43..9e3355ef2 100644 --- a/numpy/testing/__init__.py +++ b/numpy/testing/__init__.py @@ -14,8 +14,11 @@ from ._private import extbuild, decorators as dec from ._private.nosetester import ( run_module_suite, NoseTester as Tester ) +from . import overrides -__all__ = _private.utils.__all__ + ['TestCase', 'run_module_suite'] +__all__ = ( + _private.utils.__all__ + ['TestCase', 'run_module_suite', 'overrides'] +) from numpy._pytesttester import PytestTester test = PytestTester(__name__) diff --git a/numpy/testing/overrides.py b/numpy/testing/overrides.py index d20ed60e5..e6a36b7b9 100644 --- a/numpy/testing/overrides.py +++ b/numpy/testing/overrides.py @@ -21,6 +21,7 @@ def get_overridable_numpy_ufuncs(): """ ufuncs = {obj for obj in _umath.__dict__.values() if isinstance(obj, _ufunc)} + return ufuncs def allows_array_ufunc_override(func): |