Issue 16790: provide ability to share tests between int and long tests (original) (raw)

Created on 2012-12-27 05:33 by chris.jerdonek, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue-16790-1-27.patch chris.jerdonek,2012-12-27 05:43
issue-16790-2-27.patch chris.jerdonek,2012-12-27 06:54
Messages (9)
msg178271 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2012-12-27 05:33
Currently, adding new int() and long() tests that are common to both requires duplicating the tests in both test_int and test_long, which makes the tests harder to review and maintain and keep in synch. Providing a simple way to share tests between test_int and test_long will simplify adding new tests for issues like issue 16784, issue 16761, and issue 16772. This issue isn't applicable to 3.x because in 3.x test_int and test_long both test int(), so it doesn't make sense to repeat tests in both.
msg178272 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2012-12-27 05:43
Attaching patch. The tests moved to SharedTestCaseMixin in this patch are tests that were very recently added (as part of issue 16045) and that are planned on being added to test_long as part of issue 16784.
msg178274 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-12-27 06:11
Why not inherit IntTestCases and LongTest from SharedTestCaseMixin? And looks as CommonSomeTest naming is more common than SharedSomeTest.
msg178278 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2012-12-27 06:33
Good point. New patch coming shortly.
msg178281 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2012-12-27 06:54
Note that we need to be more careful about checking for duplicate test names now.
msg178282 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2012-12-27 07:08
After this issue, the ordering of new test_int test cases in 3.x should preferably match the ordering in 2.7 for easier back-porting when the tests are new in both. For example, test_no_args() and test_keyword_args() could go at the top of 3.x's IntTestCases.
msg178305 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-12-27 17:23
LGTM.
msg178329 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-12-27 20:54
New changeset eb1734e579f7 by Chris Jerdonek in branch '2.7': Issue #16790: add some of the recent issue #16045 int tests to test_long. http://hg.python.org/cpython/rev/eb1734e579f7
msg178330 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2012-12-27 20:56
Thanks for the reviews, Serhiy.
History
Date User Action Args
2022-04-11 14:57:39 admin set github: 60994
2012-12-27 20:56:35 chris.jerdonek set status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2012-12-27 20:54:39 python-dev set nosy: + python-devmessages: +
2012-12-27 17:23:14 serhiy.storchaka set messages: +
2012-12-27 07:08:13 chris.jerdonek set messages: +
2012-12-27 06:54:13 chris.jerdonek set files: + issue-16790-2-27.patchmessages: +
2012-12-27 06:33:59 chris.jerdonek set messages: +
2012-12-27 06:11:34 serhiy.storchaka set nosy: + serhiy.storchakamessages: + components: + Tests, - Interpreter Coretype: enhancementstage: patch review
2012-12-27 05:48:28 chris.jerdonek link issue16784 dependencies
2012-12-27 05:43:13 chris.jerdonek set files: + issue-16790-1-27.patchkeywords: + patchmessages: +
2012-12-27 05:33:17 chris.jerdonek create