[issue14858] 'pysetup create' off-by-one when choosing classification maturity status interactively.
Todd DeLuca
report at bugs.python.org
Sun May 27 12:03:09 CEST 2012
Todd DeLuca <todddeluca at gmail.com> added the comment:
This patch fixes the problem where the user would select a maturity status when runnning 'pysetup create' and the resulting setup.cfq would have a maturity status one less than the user selected.
It also fixes the behavior where a user can select '0' as a maturity status, which is not a valid selection, and setup.cfg will contain maturity status 'Development Status :: 7 - Inactive'. This behavior is related to the implementation of the off-by-one error above, since '0' is translated into a list lookup using the index -1.
Finally, the patch addresses behavior where a user cannot enter a blank maturity status (e.g. by just pressing the 'return' key) in order to skip the question.
The unit tests added to 'test_create.py' cover expected behavior when entering and blank selection, an invalid selection, and a valid selection.
These tests were run using Python 2.7.3 on my Mac OS X 10.6.8 (Snow Leopard).
----------
keywords: +patch
Added file: http://bugs.python.org/file25731/issue14858.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14858>
_______________________________________
More information about the Python-bugs-list
mailing list