On Wed, Apr 05, 2017 at 06:41:05PM +0200, Dmitry Dygalo wrote:
> Hello everyone!
> 
> Here is my 2 ,-.
> What do you think about the following syntax?
> 
> with not pytest.raises():
>     foo()
> 
> or
> 
> with not pytest.raises(BaseException):
>     foo()
> 
> Is it possible to negate pytest.raises?
> I'm not familiar with the implementation, but from user perspective it
> seems more friendly to me.

That'd make the original use-case for pytest.raises(None) (make it
easier to parametrize expected exceptions) impossible again.

Florian

-- 
http://www.the-compiler.org | [email protected] (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/

Attachment: signature.asc
Description: PGP signature

_______________________________________________
pytest-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to