[Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses
Ben Finney
bignose+hates-spam at benfinney.id.au
Sun Jul 13 14:38:39 CEST 2008
Andrew Bennetts <andrew-pythondev at puzzling.org> writes:
> On the other hand, “assert*” names are positive statements of what
> the behaviour of the system-under-test is.
That statement is better made by the name of the test case. The method
used for implementing the test shouldn't need to be part of that
statement.
> And conversely, “fail*” names are a bit like implementation
> details of how the test is written.
Entirely appropriate, since those names are used exactly at the point
of implementing the test, and the names are not visible outside that
implementation. No?
> My suspicion is that it will be very hard to get consensus on the
> colour of this particular bike shed :)
Perhaps so :-)
--
\ “Quidquid latine dictum sit, altum viditur.” (“Whatever is |
`\ said in Latin, sounds profound.”) —anonymous |
_o__) |
Ben Finney
More information about the Python-Dev
mailing list