Message103197
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. |
|
Date |
User |
Action |
Args |
2010-04-15 11:06:51 | lregebro | set | recipients:
+ lregebro, barry, georg.brandl, ncoghlan, r.david.murray, Julian.Scheid |
2010-04-15 11:06:51 | lregebro | set | messageid: <1271329611.39.0.684241448462.issue7490@psf.upfronthosting.co.za> |
2010-04-15 11:06:50 | lregebro | link | issue7490 messages |
2010-04-15 11:06:50 | lregebro | create | |
|