[pytest-dev] [3.1 feature] "assert not raise exception" helper: opinions about the name
Florian Bruhin
me at the-compiler.org
Wed Apr 5 11:46:49 EDT 2017
Hey,
On Wed, Apr 05, 2017 at 05:25:01PM +0200, Ronny Pfannschmidt wrote:
> while experimenting i learned of the fun fact that None is a "valid
> exception type"
> for except clauses on at least python 2.7
But it doesn't seem to be possible to raise it:
Python 2.7.13 (default, Dec 21 2016, 07:16:46)
>>> raise None
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType
Florian
--
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20170405/45d1f9f9/attachment.sig>
More information about the pytest-dev
mailing list