Re: [Pyunit-interest] Assert that an Exception is NOT raised.
Brought to you by:
purcell
From: Fred L. D. Jr. <fd...@ac...> - 2002-12-11 06:13:43
|
Timothy Grant writes: > I'm pretty new to PyUnit, one of the things I think is neat is that > there's a difference between test Failures and Errors. The problem is, I > want to assert that an Exception is NOT raised, but the test fails with > an Error because an Exception is raised. > > Is there something like assertDoesNotRaise(ExceptionClass)? I'm afraid I've never found the distinction very useful in practice. Whether something is reported as a failure or an error, I need to fix a bug somewhere, and that's really the issue. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation |