# numpy.testing.assert_raises_regex

testing.assert_raises_regex(exception_class, expected_regexp, callable, *args, **kwargs) assert_raises_regex(exception_class, expected_regexp)

  Fail unless an exception of class exception_class and with message that matches expected_regexp is thrown by callable when invoked with arguments args and keyword arguments kwargs.

  Alternatively, can be used as a context manager like `assert_raises`.

  Notes

  New in version 1.9.0.

previous

numpy.testing.assert_raises

next

numpy.testing.assert_warns