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

Mark Hammond mhammond at skippinet.com.au
Sun Jul 13 20:19:57 CEST 2008


> On Mon, 14 Jul 2008 12:45:58 am Michael Foord wrote:
> 
> > I tend to think of testing as action followed by assertion -
> > I do this and this should have happened. Your tests usually define
> > 'expected behaviour' rather than defining how your code won't fail...
> 
> Who is the "your" that you are speaking for there? It isn't me.

Although Michael unfortunately chose to use "Your", it is clear to me that
the context implies he actually meant "My" (as in, his)

> I resent having to turn the condition around into
> a "assert if not" test just to satisfy others who are never going to
> read my code. I wish people would go find another bike shed to
> interfere with.

Oh please, just get over it, and try to stick to the issue at hand rather
than trying to score points or acting under the assumption that everyone is
out to give you cause to "resent" things...

As Steve said, this is getting silly...

Mark




More information about the Python-Dev mailing list