### Navigation

- index
- modules |
- modules |
- next |
- previous |
- NumPy v1.5 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Test Support (`numpy.testing`) »

# numpy.testing.assert_raises

`numpy.testing.``assert_raises`(exception_class, callable, *args, **kwargs)

  Fail unless an exception of class exception_class is thrown by callable when invoked with arguments args and keyword arguments kwargs. If a different type of exception is thrown, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception.

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- NumPy v1.5 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Test Support (`numpy.testing`) »