sklearn.utils.testing.assert_raise_message(exceptions, message, function, *args, **kwargs)
[source]
Helper function to test the message raised in an exception.
Given an exception, a callable to raise the exception, and a message string, tests that the correct exception is raised and that the message is a substring of the error thrown. Used to test that the specific message thrown during an exception is correct.
Parameters: |
|
---|
© 2007–2018 The scikit-learn developers
Licensed under the 3-clause BSD License.
http://scikit-learn.org/stable/modules/generated/sklearn.utils.testing.assert_raise_message.html