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

Steve Holden steve at holdenweb.com
Thu Mar 20 02:29:27 CET 2008


Leif Walsh wrote:
> 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.
> 
As Guido(?) pointed out, this would be acceptable because it's simply 
different spellings of the same way.

regards
  Steve



More information about the Python-Dev mailing list