Issue 16784: Int tests enhancement and refactoring (original) (raw)
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/60988
classification
Title: | Int tests enhancement and refactoring | ||
---|---|---|---|
Type: | enhancement | Stage: | resolved |
Components: | Tests | Versions: | Python 3.2, Python 3.3, Python 3.4, Python 2.7 |
process
Status: | closed | Resolution: | fixed |
---|---|---|---|
Dependencies: | 16761 16772 16790 16792 16793 | Superseder: | |
Assigned To: | serhiy.storchaka | Nosy List: | chris.jerdonek, ezio.melotti, iritkatriel, serhiy.storchaka |
Priority: | normal | Keywords: |
Created on 2012-12-26 10:33 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (9) | ||
---|---|---|
msg178197 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2012-12-26 10:33 |
Int tests should be synchronized between different Python versions. Tests for int and long should be synchronized in 2.7. Common code for int and long tests should be shared in 2.7. CPython tests (i.e. small int identity) should be extracted to separated methods. Tests should be resorted by tested feature. Deprecated assertEquals should be replaced to assertEqual. And may be more. | ||
msg178203 - (view) | Author: Chris Jerdonek (chris.jerdonek) * ![]() |
Date: 2012-12-26 11:28 |
Other things that should be done include porting the more comprehensive tests in a recent changeset from 2.7 to 3.x and refactoring the try-except of one of the tests as necessary (see the Rietveld comments of issue 16761 for details on both). The various issues in this comment and above should probably be broken into multiple patches. | ||
msg178273 - (view) | Author: Chris Jerdonek (chris.jerdonek) * ![]() |
Date: 2012-12-27 05:48 |
I created issue 16790 to allow the sharing of tests between test_int and test_long in 2.7. I don't think issue 16761 and issue 16772 should be prerequisites to this issue though because both issues could benefit from issue 16790 being committed first (since both issues may involve adding tests to test_int and test_long). Also, I don't necessarily think that *all* tests should be shared between test_int and test_long because that refactoring may be too invasive, but certainly the new ones we are considering adding. | ||
msg178276 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2012-12-27 06:29 |
A large part of IntTestCases.test_basic() and LongTest.test_long() can be shared, as a number of smaller tests. | ||
msg178277 - (view) | Author: Chris Jerdonek (chris.jerdonek) * ![]() |
Date: 2012-12-27 06:32 |
Agreed. I just didn't want it to be a requirement of beginning shared tests in case anyone objects to refactoring existing tests in 2.7 -- as opposed to using it for the addition of new tests. | ||
msg178435 - (view) | Author: Chris Jerdonek (chris.jerdonek) * ![]() |
Date: 2012-12-28 21:48 |
Another task: backport the tests for current behavior added under issue 16772 (e.g. test_int_base_limits() tests). | ||
msg178441 - (view) | Author: Chris Jerdonek (chris.jerdonek) * ![]() |
Date: 2012-12-28 23:49 |
Improvement of int/long tests should also be reflected in the Tests section of Misc/NEWS. An entry wasn't added in issue 16045. For linking purposes, this issue number would probably be the best to use for such an entry. | ||
msg222103 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014-07-02 13:27 |
is there anything left to do here? | ||
msg380480 - (view) | Author: Irit Katriel (iritkatriel) * ![]() |
Date: 2020-11-06 22:34 |
It seems that all dependencies are complete, so if nobody will object I will close this too. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:57:39 | admin | set | github: 60988 |
2020-11-22 18:23:33 | iritkatriel | set | status: pending -> closedresolution: fixedstage: needs patch -> resolved |
2020-11-06 22:34:49 | iritkatriel | set | status: open -> pendingnosy: + iritkatrielmessages: + |
2019-03-16 00:10:42 | BreamoreBoy | set | nosy: - BreamoreBoy |
2014-07-02 13:27:22 | BreamoreBoy | set | nosy: + BreamoreBoymessages: + |
2012-12-28 23:49:19 | chris.jerdonek | set | messages: + |
2012-12-28 21:48:20 | chris.jerdonek | set | messages: + |
2012-12-27 17:16:40 | serhiy.storchaka | set | dependencies: + Get rid of deprecated assertEquals etc in tests |
2012-12-27 15:37:33 | serhiy.storchaka | set | dependencies: + Mark small ints test as CPython-only |
2012-12-27 06:32:23 | chris.jerdonek | set | messages: + |
2012-12-27 06:29:08 | serhiy.storchaka | set | messages: + |
2012-12-27 05:48:28 | chris.jerdonek | set | dependencies: + provide ability to share tests between int and long testsmessages: + |
2012-12-26 11:29:01 | ezio.melotti | set | nosy: + ezio.melotti |
2012-12-26 11:28:19 | chris.jerdonek | set | messages: + |
2012-12-26 10:40:01 | serhiy.storchaka | set | nosy: + chris.jerdonekdependencies: + Fix int(base=X), int() accepts float number base |
2012-12-26 10:33:21 | serhiy.storchaka | create |