Re: [pytest-dev] Allow pytest.raises to assert about exception arguments

2013-10-14 Thread Bruno Oliveira
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

Re: [pytest-dev] Allow pytest.raises to assert about exception arguments

2013-10-14 Thread holger krekel
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