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

Tres Seaver tseaver at palladion.com
Wed Jul 16 21:44:23 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

M.-A. Lemburg wrote:
> 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
> careful.

+1.  I had just groped my way to that counter-proposal myself, for
exactly your reasons.


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIfk+W+gerLs4ltQ4RApZlAJ47NVKXxbL/oaYyVZEUgRnnvajm+wCgyOO2
4GbVo2D1eWYcJvpx1yf8bLs=
=2HV6
-----END PGP SIGNATURE-----



More information about the Python-Dev mailing list