Re: [Pyunit-interest] comments on PyUnit
Brought to you by:
purcell
From: Guido v. R. <gu...@di...> - 2001-04-11 18:03:09
|
> Thanks Guido, points duly noted. You're welcome. :-) > I propose the following: > > - Add 'failUnlessRaises()' to TestCase > - Add 'failIfEqual()' to TestCase > - Add 'failUnlessEqual()' to TestCase (and probably 'failIfEqual()' too) > - Document the 'fail*' methods > - Keep the 'assert*' methods but don't mention them > - Don't mention using the 'assert' statement > - Make all 'fail*' and 'assert*' methods delegate to 'fail()', as > suggested by Fred > - Keep AssertionError as the 'blessed failure exception', but > parameterise it at module level All good. I agree that we shouldn't break existing code now. > I think this can be safely done in time for this week's 2.1 release > (though that's not *my* call to make). The code freeze is planned to start Thursday (probably Thu afternoon), so you have approximately a day! > The 'blessed' failure exception could be changed at a later date if that > turns out to be desirable. However, I think that if the documentation does > not encourage test writers to use the 'assert' statement, this will never > be a problem. I still think it would be a good idea to change the blessed exception later, to encourage users who are still using assert statements from fixing their tests. But I agree that we shouldn't break their code with the 2.1 release. > If this is acceptable, I can make appropriate changes. Please do, and please be quick! :-) > (Users should note that the proposed changes would have no effect on their > existing tests.) This, plus the fact that unittest wasn't part of Python 2.0, makes me comfortable with this change so close to the final release. Fred Drake has volunteered to make the documentation updates, including warnings against the use of assert statement and methods. --Guido van Rossum (home page: http://www.python.org/~guido/) |