diff options
author | Josh Wilson <person142@users.noreply.github.com> | 2019-01-19 13:45:26 -0800 |
---|---|---|
committer | Brigitta Sipőcz <bsipocz@gmail.com> | 2022-09-21 12:17:31 -0700 |
commit | 7e9f225ce23fd6df6893020f54b1b5daf883f9b9 (patch) | |
tree | ec26009094d74e622b3d36e3805c5b3d66138a99 /numpy/lib/tests | |
parent | 852f797006aab17d9af9d5f66c9dc2b7afe507d4 (diff) | |
download | numpy-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.py | 4 |
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') |