I'm only mocking out during the life of the context manager, and then I am asserting some conditions on the number and type of those warnings. I do agree though that in this *specific* case the "no_warnings" decorator is not achieving anything functionally (though it does make it quite clear that warnings have been considered in the development of the tests). As such, I'd be willing to remove this decorator (and there is a similar one below). Your call - I can live with it either way.