Re: [Pyunit-interest] comments on PyUnit
Brought to you by:
purcell
From: Fred L. D. Jr. <fd...@ac...> - 2001-04-12 18:51:57
|
Steve Purcell writes: > I decided against that; the extra level of traceback output is unsightly. > The failure exception is now parameterised, and the framework is not written > such that it would be safe and/or desirable to override fail() in subclasses. Guido agrees with you, and I just wasn't thinking about the extra traceback cruft. > I also decided against this; fail() does not have a common-sense > 'assert' counterpart, and 'assertNot' is better served by 'assert_(not expr)' > for those users who prefer 'assert*' to 'fail*'. Again, Guido agrees. His expected usage was different, but exactly equivalent: if expr: self.fail(...) (This has the advantage of being just slightly faster as well.) -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Digital Creations |