(name)
| 541 | 'ModuleDeprecationWarning', 'VisibleDeprecationWarning', |
| 542 | 'ComplexWarning', 'TooHardError', 'AxisError']) |
| 543 | def test_moved_exceptions(name): |
| 544 | # These were moved to the exceptions namespace, but currently still |
| 545 | # available |
| 546 | assert name in np.__all__ |
| 547 | assert name not in np.__dir__() |
| 548 | # Fetching works, but __module__ is set correctly: |
| 549 | assert getattr(np, name).__module__ == "numpy.exceptions" |
| 550 | assert name in np.exceptions.__all__ |
| 551 | getattr(np.exceptions, name) |