An alternative would be to use another "raises" function, like
with raises_message(SpecificError, 'specific message'):
some_action()
One problem is bloating the API a little more...
Cheers,
Bruno.
On Mon, Oct 14, 2013 at 5:50 PM, holger krekel wrote:
> On Mon, Oct 14, 2013 at 17:19 +0200
On Mon, Oct 14, 2013 at 17:19 +0200, Vladimir Keleshev wrote:
> Right now one of my code-bases is filled with assertions like:
>
> with raises(SpecificError) as error:
> some_action()
> assert 'specific message' == str(error)
>
> Why not change `raises` to allow instances of exceptions as wel