MCPcopy Create free account
hub / github.com/numpy/numpy / test_moved_exceptions

Function test_moved_exceptions

numpy/tests/test_public_api.py:543–551  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

541 'ModuleDeprecationWarning', 'VisibleDeprecationWarning',
542 'ComplexWarning', 'TooHardError', 'AxisError'])
543def 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)

Callers

nothing calls this directly

Calls 1

__dir__Method · 0.80

Tested by

no test coverage detected