Issue 7435: Int/Long: some tests are duplicate and error messages refer to "long" (original) (raw)

Issue7435

Created on 2009-12-04 20:55 by flox, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue7435_py3k.diff flox,2009-12-04 20:56 Patch against branches/py3k
Messages (4)
msg95971 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2009-12-04 20:55
In python 3.x there's a single type for integer: int. The automatic conversion of the test suite has created many tests which are duplicate of each other. The attached patch removes duplication of tests, and fix the strings for these modules: Lib/random.py Lib/test/mapping_tests.py Lib/test/pickletester.py Lib/test/string_tests.py Lib/test/test_binop.py Lib/test/test_builtin.py Lib/test/test_datetime.py Lib/test/test_decimal.py Lib/test/test_descr.py Lib/test/test_dict.py Lib/test/test_getargs2.py Lib/test/test_int.py Lib/test/test_long.py Lib/test/test_types.py
msg95996 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-12-05 17:13
Looks fine to me. I'd probably keep MyInt rather than MyLong in Lib/test/pickletester.py, and Int rather than Long in Lib/test/test_getargs2.py, but that's just a matter of renaming. I note the major deletions in test_long; maybe the remaining tests in test_long should be moved from there to test_int? With this patch, all tests pass for me on OS X 10.6. Eric, this patch affects a bunch of formatting tests, particularly in Lib/test/test_types.py; I don't know whether you're trying to keep trunk and py3k formatting tests synchronized for ease of maintenance. Are you?
msg96003 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2009-12-05 19:51
> Eric, this patch affects a bunch of formatting tests, particularly > in Lib/test/test_types.py; I don't know whether you're trying to > keep trunk and py3k formatting tests synchronized for ease of > maintenance. Are you? No, I've basically given up on keeping the tests in sync. The implementations are the same but not the tests.
msg96006 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-12-05 20:30
Patch applied in r76681 (I took the liberty of doing the MyLong -> MyInt and Long -> Int renames). Many thanks, flox!
History
Date User Action Args
2022-04-11 14:56:55 admin set github: 51684
2009-12-05 20:30:14 mark.dickinson set status: open -> closedresolution: acceptedmessages: + stage: resolved
2009-12-05 19:51:10 eric.smith set messages: +
2009-12-05 17:13:31 mark.dickinson set messages: +
2009-12-05 01:17:33 pitrou set nosy: + mark.dickinson, eric.smith
2009-12-04 20:56:34 flox set files: + issue7435_py3k.diffkeywords: + patch
2009-12-04 20:55:16 flox create