Lennart Regebro <[email protected]> added the comment:
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.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue7490>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com