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

Michael Urman murman at gmail.com
Wed Mar 19 15:21:53 CET 2008


> OTOH, I'd rather there be OOWTDI so whatever the consensus is is fine
> with me.

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"

Yes it removes redundancy, but it really doesn't change the cognitive
load (at least for native speakers). If the blessed set were
restricted to assert*, what would users of fail* do when trying to
test their packages on py3k? Search and replace, or monkey patch
unittest? I'm guessing monkey patch unittest, which means the change
saves nothing, and costs plenty.

Note the acronym is OOWTDI, not OONTDI - using a different name does
not necessarily make it a different way.
-- 
Michael Urman


More information about the Python-Dev mailing list