decorator looks good, I don't think I have used it before.

The only possible disadvantage compared to assert_raises is if the is other code in the method that could possibly also raise and that the decorator covers too much.

as example `kde = KDE(Xi)` could be attached to self in a `@classmethod  def setup_class`