[Python-Dev] PEP: Consolidating names and classes in the `unittest`module (updated 2008-07-15)

Paul Moore p.f.moore at gmail.com
Tue Jul 15 12:58:04 CEST 2008

On 15/07/2008, Raymond Hettinger <python at rcn.com> wrote:
> > ``set_up(…)``
> >  Replaces ``setUp(…)``
> >
> . .
> > ``tear_down(…)``
> >  Replaces ``tearDown(…)``
> >
> Am I the only one who finds this sort of excessive pep-8 underscoring to be
> horrorific?


> Nobody I know spells setup and teardown as two words. I dread using the
> module with these new names. Underscores are not fun to type. They create a
> weird_mental_pause when reading them.

I agree. The java-esque setUp and tearDown are (in my view) ugly, but
set_up and tear_down are as bad.

+1 for setup and teardown.

+1 also for thinking a *lot* harder about naming, and not just going
with phrases_joined_up_with_underscores, or

There are certainly issues with the simple

    assert expression

approach, but ugliness and unreadability aren't two of them.


More information about the Python-Dev mailing list