Issue 29912: Overlapping tests between list_tests and seq_tests (original) (raw)
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/74098
classification
Title: | Overlapping tests between list_tests and seq_tests | ||
---|---|---|---|
Type: | behavior | Stage: | resolved |
Components: | Tests | Versions: |
process
Status: | closed | Resolution: | fixed |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | Nosy List: | Jim Fasarakis-Hilliard, brett.cannon | |
Priority: | normal | Keywords: |
Created on 2017-03-26 23:42 by Jim Fasarakis-Hilliard, last changed 2022-04-11 14:58 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 847 | merged | Jim Fasarakis-Hilliard,2017-03-27 12:47 |
Messages (3) | ||
---|---|---|
msg290550 - (view) | Author: Jim Fasarakis-Hilliard (Jim Fasarakis-Hilliard) * | Date: 2017-03-26 23:42 |
Seems the CommonTests class defined in list_tests duplicates the testing performed by seq_tests.CommonTests in the following functions: test_index, test_count Additionally, a part of test_imul from list_tests.CommonTests can be moved to seq_tests.CommonTests. (specifically, up until ` self.assertEqual(u, self.type2test([]))`). Am I missing some non-obvious thing here or can I safely remove the two test functions in list_tests.CommonTests and move (while also adding a super call) part of test_imul from list_tests.CommonTests to test_imul in seq_tests.CommonTests? Some links: [1a] seq_tests test_index: https://github.com/python/cpython/blob/1e73dbbc29c96d0739ffef92db36f63aa1aa30da/Lib/test/seq_tests.py#L363 [1b] list_tests test_index: https://github.com/python/cpython/blob/1e73dbbc29c96d0739ffef92db36f63aa1aa30da/Lib/test/list_tests.py#L376 [2a] seq_tests test_count: https://github.com/python/cpython/blob/1e73dbbc29c96d0739ffef92db36f63aa1aa30da/Lib/test/seq_tests.py#L344 [2b] list_tests test_count: https://github.com/python/cpython/blob/1e73dbbc29c96d0739ffef92db36f63aa1aa30da/Lib/test/list_tests.py#L357 [3a] seq_tests test_imul: https://github.com/python/cpython/blob/1e73dbbc29c96d0739ffef92db36f63aa1aa30da/Lib/test/seq_tests.py#L300 [3b] list_tests test_imul: https://github.com/python/cpython/blob/1e73dbbc29c96d0739ffef92db36f63aa1aa30da/Lib/test/list_tests.py#L550 | ||
msg290590 - (view) | Author: Jim Fasarakis-Hilliard (Jim Fasarakis-Hilliard) * | Date: 2017-03-27 11:32 |
Correction: test_index *partially* duplicates the base class method. It too can be modified to use super like test_imul. | ||
msg290638 - (view) | Author: Brett Cannon (brett.cannon) * ![]() |
Date: 2017-03-27 19:35 |
New changeset d702c50049207d825c1d5925fbc7306514fa9a0a by Brett Cannon (Jim Fasarakis-Hilliard) in branch 'master': bpo-29912: Remove redundant tests in list_tests that are found in seq_tests (GH-847) https://github.com/python/cpython/commit/d702c50049207d825c1d5925fbc7306514fa9a0a |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:58:44 | admin | set | github: 74098 |
2017-03-27 19:36:11 | brett.cannon | set | status: open -> closedresolution: fixedstage: resolved |
2017-03-27 19:35:54 | brett.cannon | set | nosy: + brett.cannonmessages: + |
2017-03-27 12:47:14 | Jim Fasarakis-Hilliard | set | pull_requests: + <pull%5Frequest745> |
2017-03-27 11:32:01 | Jim Fasarakis-Hilliard | set | messages: + |
2017-03-26 23:42:37 | Jim Fasarakis-Hilliard | create |