[Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses

Leif Walsh adlaiff6 at gmail.com
Thu Mar 20 01:49:37 CET 2008


On Wed, Mar 19, 2008 at 7:05 PM, Paul Moore <p.f.moore at gmail.com> wrote:
>  > This strikes me as a gratuitous API change of the kind Guido was
>  >  warning about in his recent post: "Don't change your APIs incompatibly
>  >  when porting to Py3k"
>
>  This seems compelling to me. And as Glyph mentioned, the testing APIs
>  are the most critical ones to keep working when moving from 2 to 3.

It seems as though this declaration, in this case, is in direct
conflict with the overarching theme of "one obvious way to do things".
 That statement, of course, is the reason so many things are being
changed in the move to 3k already, and I don't see why this shouldn't
be one of them (particularly, because it's so easy to account for this
in 2to3).  As one is a global statement, and the other is fairly
local, I vote for the change.

-- 
Cheers,
Leif


More information about the Python-Dev mailing list