I'd like to write some unit tests to check my software. Writing unittest blocks and putting assert statements in there seems easy enough, but I noticed that if the code I run in there throws an exception, I don't get the unit test failed message.

How does unittest check for success/failure? Does assert throw a special kind of error class when it fails? How would you check that some code didn't throw an exception, or did throw an exception?

Reply via email to