summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
diff options
context:
space:
mode:
authorJosh Wilson <person142@users.noreply.github.com>2019-01-19 13:45:26 -0800
committerBrigitta Sipőcz <bsipocz@gmail.com>2022-09-21 12:17:31 -0700
commit7e9f225ce23fd6df6893020f54b1b5daf883f9b9 (patch)
treeec26009094d74e622b3d36e3805c5b3d66138a99 /numpy/lib/tests
parent852f797006aab17d9af9d5f66c9dc2b7afe507d4 (diff)
downloadnumpy-7e9f225ce23fd6df6893020f54b1b5daf883f9b9.tar.gz
MAINT: update function's `__module__` attribute in `deprecate`
Currently the location of the function definition is always reported to be `numpy.lib.utils`; this changes it to be the location of the actual definition when possible.
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r--numpy/lib/tests/test_utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_utils.py b/numpy/lib/tests/test_utils.py
index 72c91836f..6ad4bfe6d 100644
--- a/numpy/lib/tests/test_utils.py
+++ b/numpy/lib/tests/test_utils.py
@@ -115,6 +115,10 @@ def test_deprecate_preserve_whitespace():
assert_('\n Bizarre' in new_func5.__doc__)
+def test_deprecate_module():
+ assert_(old_func.__module__ == __name__)
+
+
def test_safe_eval_nameconstant():
# Test if safe_eval supports Python 3.4 _ast.NameConstant
utils.safe_eval('None')