scikit-learn/scikit-learn — pull request #2760 by AlexanderFabisch (2014-01-16 22:29:27+00:00)
Title: [WIP] Check error message with regex

Introduces `assert_raise_message_pattern` as suggested by @ogrisel [here](https://github.com/scikit-learn/scikit-learn/pull/2736/files#r8889008).

On the one hand we should not check for the exact error message, on the other hand checking for small substrings might not be accurate enough. Checking for patterns seems to be a good compromise. I added some examples in `sklearn/metrics/tests/test_score_objects.py`.