Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overlapping tests between list_tests and seq_tests #74098

Closed
DimitrisJim mannequin opened this issue Mar 26, 2017 · 3 comments
Closed

Overlapping tests between list_tests and seq_tests #74098

DimitrisJim mannequin opened this issue Mar 26, 2017 · 3 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@DimitrisJim
Copy link
Mannequin

DimitrisJim mannequin commented Mar 26, 2017

BPO 29912
Nosy @brettcannon, @DimitrisJim
PRs
  • bpo-29912: Remove overlapping tests in list_tests and seq_tests #847
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-03-27.19:36:11.034>
    created_at = <Date 2017-03-26.23:42:37.128>
    labels = ['type-bug', 'tests']
    title = 'Overlapping tests between list_tests and seq_tests'
    updated_at = <Date 2017-03-27.19:36:11.034>
    user = 'https://github.com/DimitrisJim'

    bugs.python.org fields:

    activity = <Date 2017-03-27.19:36:11.034>
    actor = 'brett.cannon'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-03-27.19:36:11.034>
    closer = 'brett.cannon'
    components = ['Tests']
    creation = <Date 2017-03-26.23:42:37.128>
    creator = 'Jim Fasarakis-Hilliard'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 29912
    keywords = []
    message_count = 3.0
    messages = ['290550', '290590', '290638']
    nosy_count = 2.0
    nosy_names = ['brett.cannon', 'Jim Fasarakis-Hilliard']
    pr_nums = ['847']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue29912'
    versions = []

    @DimitrisJim
    Copy link
    Mannequin Author

    DimitrisJim mannequin commented Mar 26, 2017

    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:

    def test_index(self):

    [1b] list_tests test_index:
    def test_index(self):

    [2a] seq_tests test_count:

    def test_count(self):

    [2b] list_tests test_count:
    def test_count(self):

    [3a] seq_tests test_imul:

    def test_imul(self):

    [3b] list_tests test_imul:
    def test_imul(self):

    @DimitrisJim DimitrisJim mannequin added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Mar 26, 2017
    @DimitrisJim
    Copy link
    Mannequin Author

    DimitrisJim mannequin commented Mar 27, 2017

    Correction: test_index *partially* duplicates the base class method. It too can be modified to use super like test_imul.

    @brettcannon
    Copy link
    Member

    New changeset d702c50 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)
    d702c50

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant