[Python-Dev] unittest's redundant assertions: asserts vs. failIf/Unlesses
collinw at gmail.com
Wed Mar 19 23:51:17 CET 2008
On Wed, Mar 19, 2008 at 10:12 AM, Michael Urman <murman at gmail.com> wrote:
> On Wed, Mar 19, 2008 at 10:44 AM, Stephen J. Turnbull
> <stephen at xemacs.org> wrote:
> > So we should add this to 2to3, no? They're going to run that anyway.
> If 2to3 can handle this, that removes the larger half of my objection.
> I was under the impression that this kind of semantic inferencing was
> beyond its capabilities. But even if so, maybe it's safe to assume
> that those names aren't used in other contexts.
2to3 can indeed handle this, but I'm not sure I would want it run
automatically (rather have it be opt-in, the way several other fixers
are). Solid test suites are critical to the transition process, and
changing method names around may upset that. It's unlikely, sure, but
it may add to general unease.
The way I'd see such a fixer working is that people would run it over
their 2.x codebase, commit that change, then transition the rest of
their code at release-time, without having to worry about gratuitous
code changes in their test suite.
More information about the Python-Dev