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

Reorganize C API tests #78453

Closed
serhiy-storchaka opened this issue Jul 29, 2018 · 12 comments
Closed

Reorganize C API tests #78453

serhiy-storchaka opened this issue Jul 29, 2018 · 12 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes tests Tests in the Lib/test dir topic-C-API type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented Jul 29, 2018

BPO 34272
Nosy @rhettinger, @ezio-melotti, @voidspace, @serhiy-storchaka, @miss-islington, @tirkarthi
PRs
  • bpo-34272: Reorganize C API tests. #8551
  • bpo-34272: Move argument parsing tests from test_capi to test_getargs2. #8567
  • [3.7] bpo-34272: Move argument parsing tests from test_capi to test_getargs2. (GH-8567) #8689
  • [3.6] bpo-34272: Move argument parsing tests from test_capi to test_getargs2. (GH-8567). #8690
  • [2.7] bpo-34272: Move argument parsing tests from test_capi to test_getargs2. (GH-8567). #8691
  • [3.6] bpo-34272: Restore test_capi.EmbeddingTests, unintentionally removed in 278d975c #10078
  • 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 = None
    created_at = <Date 2018-07-29.12:56:00.979>
    labels = ['3.7', 'expert-C-API', '3.8', 'type-feature', 'tests']
    title = 'Reorganize C API tests'
    updated_at = <Date 2019-12-09.16:13:39.037>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2019-12-09.16:13:39.037>
    actor = 'vstinner'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Tests', 'C API']
    creation = <Date 2018-07-29.12:56:00.979>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34272
    keywords = ['patch']
    message_count = 8.0
    messages = ['322635', '322648', '322656', '322682', '323207', '323209', '323210', '323211']
    nosy_count = 6.0
    nosy_names = ['rhettinger', 'ezio.melotti', 'michael.foord', 'serhiy.storchaka', 'miss-islington', 'xtreak']
    pr_nums = ['8551', '8567', '8689', '8690', '8691', '10078']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue34272'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']

    @serhiy-storchaka
    Copy link
    Member Author

    The proposed PR reorganizes C API tests. Most C API tests will be moved into the new directory Lib/test/test_capi/.

    @serhiy-storchaka serhiy-storchaka added 3.7 (EOL) end of life 3.8 only security fixes tests Tests in the Lib/test dir type-feature A feature request or enhancement labels Jul 29, 2018
    @rhettinger
    Copy link
    Contributor

    It seems to me that this will make the individual objects and modules harder to maintain. I expect to find all the tests for an object in a file called test_thatobject.py. This patch violates that expectation and separates things that belong together.

    @serhiy-storchaka
    Copy link
    Member Author

    Not all C API tests are related to specific type or module. What about moving just test_capi.py, test_getargs2.py and test_structmembers.py?

    @serhiy-storchaka
    Copy link
    Member Author

    PR 8567 moves argument parsing tests from test_capi to test_getargs2.

    It also makes tests defined in _testcapi more discoverable. Now you can run "./python -m test -v -m test_buildvalue_N test_capi".

    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 8f7bb10 by Serhiy Storchaka in branch 'master':
    bpo-34272: Move argument parsing tests from test_capi to test_getargs2. (GH-8567)
    8f7bb10

    @miss-islington
    Copy link
    Contributor

    New changeset a1ff5f9 by Miss Islington (bot) in branch '3.7':
    bpo-34272: Move argument parsing tests from test_capi to test_getargs2. (GH-8567)
    a1ff5f9

    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 278d975 by Serhiy Storchaka in branch '3.6':
    [3.6] bpo-34272: Move argument parsing tests from test_capi to test_getargs2. (GH-8567). (GH-8690)
    278d975

    @serhiy-storchaka
    Copy link
    Member Author

    New changeset d1c5e27 by Serhiy Storchaka in branch '2.7':
    [2.7] bpo-34272: Move argument parsing tests from test_capi to test_getargs2. (GH-8567). (GH-8691)
    d1c5e27

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue Nov 13, 2022
    serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue Nov 13, 2022
    serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue Nov 20, 2022
    …test_capi.test_unicode (pythonGH-99431).
    
    (cherry picked from commit 06d4e02)
    
    Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
    serhiy-storchaka added a commit that referenced this issue Nov 20, 2022
    serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue Nov 20, 2022
    …test_capi.test_unicode (pythonGH-99431).
    
    (cherry picked from commit 06d4e02)
    
    Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
    serhiy-storchaka added a commit that referenced this issue Nov 20, 2022
    …api.test_unicode (GH-99431). (GH-99617)
    
    (cherry picked from commit 06d4e02)
    
    Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
    @iritkatriel
    Copy link
    Member

    Is there anything left to do here?

    @iritkatriel iritkatriel added the pending The issue will be closed if no feedback is provided label May 22, 2023
    @encukou
    Copy link
    Member

    encukou commented May 22, 2023

    Plenty. test_capi/test_misc.py still has 1800+ lines.

    @iritkatriel iritkatriel removed the pending The issue will be closed if no feedback is provided label May 22, 2023
    @vstinner
    Copy link
    Member

    See also issue gh-93649.

    @serhiy-storchaka
    Copy link
    Member Author

    The tests were re-organized, extended, updated and re-re-organized many times.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 only security fixes tests Tests in the Lib/test dir topic-C-API type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    6 participants