sklearn.utils.testing has an assert_raises_message, which is what I think you are looking for.