[Python-Dev] PEP: Consolidating names and classes in the `unittest` module

Michael Foord fuzzyman at voidspace.org.uk
Tue Jul 15 01:08:30 CEST 2008


Ben Finney wrote:
> [snip..]
>
> Remove redundant names
> ----------------------
>
> The following attribute names exist only as synonyms for other names.
> They are to be removed, leaving only one name for each attribute in
> the API.
>
> ``TestCase`` attributes
> ~~~~~~~~~~~~~~~~~~~~~~~
>
> * ``assertEqual``
> * ``assertEquals``
> * ``assertNotEqual``
> * ``assertNotEquals``
> * ``assertAlmostEqual``
> * ``assertAlmostEquals``
> * ``assertNotAlmostEqual``
> * ``assertNotAlmostEquals``
> * ``assertRaises``
> * ``assert_``
> * ``assertTrue``
> * ``assertFalse``
>
>   
Although you may prefer the 'failIf' and 'failUnless' names, the 
consensus in the *last* discussion was that the 'assert*' names were to 
be preferred.

I protest the removal of the assert names - and in the absence of likely 
consensus (and barring a dictat of course) I suggest this part of the 
proposal be excised.

Michael


-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/
http://www.trypython.org/
http://www.ironpython.info/
http://www.theotherdelia.co.uk/
http://www.resolverhacks.net/



More information about the Python-Dev mailing list