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

M.-A. Lemburg mal at egenix.com
Wed Jul 16 10:00:32 CEST 2008

On 2008-07-16 02:20, Collin Winter wrote:
> On Tue, Jul 15, 2008 at 6:58 AM, Ben Finney <ben+python at benfinney.id.au> wrote:
>> Significant updates include removing all reference to the
>> (already-resolved) new-style class issue, adding footnotes and
>> references, and a Rationale summary of discussion on both sides of the
>> divide for 'assert*' versus 'fail*' names.
>> :PEP:               XXX
>> :Title:             Consolidating names in the `unittest` module
>> :Version:           0.2
>> :Last-Modified:     2008-07-15
>> :Author:            Ben Finney <ben+python at benfinney.id.au>
>> :Status:            Draft
>> :Type:              Standards Track
>> :Content-Type:      test/x-rst
>> :Created:           2008-07-14
>> :Python-Version:    2.7, 3.1

+1 for doing this in 3.1.

-1 for Python 2.7.

The main reason is that there's just too much 2.x code out there
using the API names you are suggesting to change and/or remove
from the module.

Since this is a major change in the unit test API, I'd also like
to suggest that you use a new module name.

This is both a precaution to prevent tests failing due to not having
been upgraded and a way for old code to continue working by adding
the old unittest module on sys.path.

Please note that the required renaming of the methods in existing
tests is not going to be as straight forward as you may think,
since you may well rename method calls into the tested application
rather than just the unit test class method calls if you're not

>> Abstract
>> ========
>> This PEP proposes to consolidate the names that constitute the API of
>> the standard library `unittest` module, with the goal of removing
>> redundant names, and conforming with PEP 8.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Jul 16 2008)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::

    eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
     D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
            Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the Python-Dev mailing list