Author lregebro
Recipients Julian.Scheid, barry, georg.brandl, lregebro, ncoghlan, r.david.murray
Date 2010-04-15.11:06:49
SpamBayes Score 0.0211942
Marked as misclassified No
Message-id <1271329611.39.0.684241448462.issue7490@psf.upfronthosting.co.za>
In-reply-to
Content
Sure: Catch the exception in the test, and fail if it isn't catched.

>>> try:
...     do_something_that_raises_exception()
...     raise Assertionerror("Exception Blah was not raised")
... except Blah:
...     pass

Ugly, yes, but easy. To make it less ugly you can make a "assertRaises()" like the one that exists on standard unit tests and call that. Not so ugly.
History
Date User Action Args
2010-04-15 11:06:51lregebrosetrecipients: + lregebro, barry, georg.brandl, ncoghlan, r.david.murray, Julian.Scheid
2010-04-15 11:06:51lregebrosetmessageid: <1271329611.39.0.684241448462.issue7490@psf.upfronthosting.co.za>
2010-04-15 11:06:50lregebrolinkissue7490 messages
2010-04-15 11:06:50lregebrocreate