[issue10712] 2to3 fixer for deprecated unittest method names

Ezio Melotti report at bugs.python.org
Wed Dec 15 20:36:37 CET 2010


New submission from Ezio Melotti <ezio.melotti at gmail.com>:

The attached patch against 2.7 adds a new fixer to 2to3 that replaces deprecated unittest method names with the correct ones.
There are a few issues:
1) only the "safe" renamings are included; the assert[SameElements|ItemsEqual|CountEqual] and the  assert*Regexp*->assert*Regex* changes are missing;
2) unless 2to3 provides a way to specify a target version (e.g. 3.2 rather than just 3.x), the missing renamings can't be included;
3) the patch is against 2.7 but I'm not sure in what versions could/should be included, or if the fixer should (also|only) go on PyPI;
4) this fixer is useful from 3.1 to 3.2 too, is there a way to use it with 3.x versions only?
5) doc is still missing;

----------
files: issue10712.diff
keywords: needs review, patch
messages: 124054
nosy: benjamin.peterson, ezio.melotti, georg.brandl, michael.foord
priority: normal
severity: normal
stage: patch review
status: open
title: 2to3 fixer for deprecated unittest method names
type: feature request
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file20062/issue10712.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10712>
_______________________________________


More information about the Python-bugs-list mailing list