summaryrefslogtreecommitdiff
path: root/numpy/tests/test_reloading.py
Commit message (Collapse)AuthorAgeFilesLines
* TST: Skip tests that are not currently supported in wasmHood Chatham2022-11-111-1/+9
|
* TST: Validate the return code of `test_full_reimport`Bas van Beek2021-07-211-2/+5
| | | | All errors raised within the sub process will remain silenced if the return code isn't validated
* DOC: Warn when reloading numpy or using numpy in sub-interpreterSebastian Berg2020-12-151-5/+9
| | | | | | | | This adds a warning when the main NumPy module is reloaded with the assumption that in this case objects such as `np.matrix`, `np._NoValue` or exceptions may be cached internally. It also gives a warning when NumPy is imported in a sub-interpreter.
* BUG: Allow attaching documentation twice in add_docstringSebastian Berg2020-05-191-0/+26
| | | | | | | This is technically not a bug, but some IDEs and IPython have autoreload magic which can mean that NumPy gets reloaded a second time. This is not safe, but when it happens ignoring that an identical docstring is already attached fixes the issue.
* MAINT: cleanup unused imports; avoid redefinition of importsMike Taves2020-02-061-2/+0
| | | | | | | * Cleanup unused imports (F401) of mostly standard Python modules, or some internal but unlikely referenced modules * Where internal imports are potentially used, mark with noqa * Avoid redefinition of imports (F811)
* MAINT: Remove sys.version checks in testsSeth Troisi2020-01-151-4/+1
|
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* MAINT: Move pickle import to numpy.compatCharles Harris2019-02-211-1/+1
| | | | | | | The pickle module was being imported from numpy.core.numeric. It was defined there in order to use pickle5 when available in Python3 and cpickle in Python2. The numpy.compat module seems a better place for that.
* MAINT, TST import pickle from numpy.core.numericPierre Glaser2018-10-101-3/+5
| | | | | | | | All imports of pickle from numpy modules are now done this way: >>> from numpy.core.numeric import pickle Also, some loops on protocol numbers are added over pickle tests that were not caught from #12090
* MAINT: Remove all uses of run_module_suite.Charles Harris2018-04-061-5/+1
| | | | | That function is nose specific and has not worked since `__init__` files were added to the tests directories.
* ENH: Add a repr to np._NoValueEric Wieser2018-02-031-1/+7
| | | | | | This change _NoValue from a class to an instance, which is more inline with the builtin None. Fixes gh-8991, closes gh-9592
* BUG: Make sure numpy globals keep identity after reload.Charles Harris2016-08-161-3/+11
| | | | | | | | | | | | Reloading currently causes problems because global classes defined in numpy/__init__.py change their identity (a is b) after reload. The solution taken here is to move those classes to a new non-reloadable module numpy/_globals and import them into numpy from there. Classes moved are ModuleDeprecationWarning, VisibleDeprecationWarning, and _NoValue. Closes #7844.
* BUG: Raise RuntimeError when reloading numpy is attempted.Charles Harris2016-07-201-0/+26
There seems to be little use in reloading numpy as any changed modules that are imported into numpy would need to be reloaded first in order to see any changes. Furthermore, reloading causes problems as global classes defined in numpy/__init__.py change their identity. Hence we raise a RuntimeError when an attempt to reload numpy is made. Closes #7844.