[Python-Dev] Proposed unittest changes

Ben Finney bignose+hates-spam at benfinney.id.au
Mon Jul 14 15:41:19 CEST 2008

Steve Holden <steve at holdenweb.com> writes:

> Ben Finney wrote:
> > and so on; i.e. that 'assert_is_not' breaks the obvious pattern
> > set by the others, in the interest of matching Python's 'is not'
> > grammar.
> Well, I'd have said "in the interest of reading correctly in English",
> though I have to acknowledge this may not be an issue for many Python
> users whose first language not is English. "assert_not_is" is just
> dissonant to my ears.

I'd count this as another (minor) point in favour of making the
'fail*' methods canonical: the names are consistent *and* gramatically

    fail_if_equal               fail_unless_equal
    fail_if_is                  fail_unless_is
    fail_if_in                  fail_unless_in
    fail_if_almost_equal        fail_unless_almost_equal

 \     “We are not gonna be great; we are not gonna be amazing; we are |
  `\           gonna be *amazingly* amazing!” —Zaphod Beeblebrox, _The |
_o__)                Hitch-Hiker's Guide To The Galaxy_, Douglas Adams |
Ben Finney

More information about the Python-Dev mailing list