GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add more C API tests · Issue #111495 · python/cpython

Add more C API tests #111495

New issue
Copy link
New issue
Copy link
Closed
Closed
Add more C API tests#111495
Copy link
Assignees
serhiy-storchaka
Labels
3.12only security fixesonly security fixes3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixestestsTests in the Lib/test dirTests in the Lib/test dirtopic-C-API

Description

@serhiy-storchaka
serhiy-storchaka
opened on Oct 30, 2023
Issue body actions
  • Add tests for PyBytes C API
  • Add tests for PyByteArray C API
  • Add tests for PyFloat C API
  • Add tests for PyComplex C API
  • Add tests for PyLong C API
  • Add tests for PyNumber C API
  • Add tests for PyTuple C API
  • Add tests for PyList C API
  • Add tests for PyCodec C API
  • Add tests for PyFile C API

Linked PRs

  • gh-111495: Add tests for PyBytes and PyByteArray C API #111496
  • gh-111495: Add tests for PyList C API #111562
  • gh-111495: add stub files for C API test modules #111586
  • gh-111495: Add tests for PyComplex C API #111591
  • [3.12] gh-111495: add stub files for C API test modules (GH-111586) #111592
  • gh-111495: Add tests for PyTuple C API #111606
  • [3.12] gh-111495: Add tests for PyBytes and PyByteArray C API (GH-111496) #111607
  • gh-111495: Add tests for PyFloat C API #111624
  • gh-111495: Test C API functions with extreme sizes and indices #111631
  • gh-111495: Add PyFile_* CAPI tests #111709
  • [3.12] gh-111495: Test C API functions with extreme sizes and indices (GH-111631) #111731
  • [3.12] gh-111495: Add tests for PyFloat C API (GH-111624) #111752
  • [3.12] gh-111495: Add tests for PyComplex C API (GH-111591) #111753
  • [3.12] gh-111495: Add tests for PyList C API (GH-111562) #111861
  • gh-111495: Add tests for PyNumber C API #111996
  • gh-111495: Add tests for PyTuple C API #118757
  • gh-111495: Add more tests on PyEval C APIs #122789
  • gh-111495: Add tests on PyTuple C APIs #122833
  • gh-111495: Fix refleaks in test_capi.test_eval tests #122851
  • gh-111495: Remove test_capi test_rshift_print() #123338
  • gh-111495: Add tests for PyCodec_* C API #123343
  • [3.13] gh-111495: Add tests for PyTuple C API (GH-118757) #123371
  • [3.13] gh-111495: Add tests for PyNumber C API (GH-111996) #123375
  • [3.12] gh-111495: Add tests for PyNumber C API (GH-111996) #123376
  • [3.12] gh-111495: Add tests for PyTuple C API (GH-118757) #123379
  • gh-111495: Add tests for PyFile C API #124915
  • gh-111495: improve test coverage of codecs C API #126030
  • [3.13] gh-111495: Add more tests on PyEval C APIs (#122789) #128987
  • [3.12] gh-111495: Add more tests on PyEval C APIs (#122789) (#128987) #129023
  • gh-111495: Add PyFile tests #129449
  • [3.13] gh-111495: Add PyFile tests (#129449) #129477
  • [3.12] gh-111495: Add PyFile tests (#129449) (#129477) #129501
Reacted by Erlend E. Aasland, Kalyan R, Victor Stinner and Cody Maloney

Activity

Next
  1. serhiy-storchaka
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    topic-C-API
    3.12only security fixesonly security fixes
    3.13only security fixesonly security fixes
    on Oct 30, 2023
  2. serhiy-storchaka
    self-assigned this
    on Oct 30, 2023
  3. serhiy-storchaka
    added a commit that references this issue on Oct 30, 2023

    pythongh-111495: Add tests for PyBytes and PyByteArray C API

    9fbc7e4
  4. skirpichev commented on Oct 31, 2023

    @skirpichev
    skirpichev
    on Oct 31, 2023
    Member
    More actions

    @serhiy-storchaka, initial set of C API tests for PyComplex (only for changed functions) was added in #109647

  5. serhiy-storchaka commented on Oct 31, 2023

    @serhiy-storchaka
    serhiy-storchaka
    on Oct 31, 2023
    MemberAuthor
    More actions

    Yes, there are also some tests for PyLong and PyNumber, and maybe other parts of the C API. But we should test the full C API, or at least document what is not tested. And it is better to group tests by the prefix, so it is clear where to find tests.

  6. serhiy-storchaka commented on Oct 31, 2023

    @serhiy-storchaka
    serhiy-storchaka
    on Oct 31, 2023
    MemberAuthor
    More actions

    If you want to work on adding tests to the part of the C API, say it here to avoid duplicating the work of other people. I finished work on PyBytes and PyByteArray and am not currently working on any of the above.

  7. skirpichev commented on Oct 31, 2023

    @skirpichev
    skirpichev
    on Oct 31, 2023
    Member
    More actions

    @serhiy-storchaka, I will factor out tests PyComplex_RealAsDouble/ImagAsDouble from #109647 and tests for other functions for PyComplexType. (BTW, in #111496 I don't see actual tests, only interfaces. Tests in my pr were modeled from pack/unpack tests in test_float.py.)

  8. serhiy-storchaka commented on Oct 31, 2023

    @serhiy-storchaka
    serhiy-storchaka
    on Oct 31, 2023
    MemberAuthor
    More actions

    Good catch, @skirpichev. I forgot to add the actual test files.

  9. rawwar commented on Oct 31, 2023

    @rawwar
    rawwar
    on Oct 31, 2023
    Contributor
    More actions

    @serhiy-storchaka , I would like to contribute tests to PyTuple and PyList C API

  10. serhiy-storchaka commented on Oct 31, 2023

    @serhiy-storchaka
    serhiy-storchaka
    on Oct 31, 2023
    MemberAuthor
    More actions

    @serhiy-storchaka , I would like to contribute tests to PyTuple and PyList C API

    Great. Look at existing PySequence tests in Lib/test/test_capi/test_abstract.py. Some PyTuple and PyList tests can be a copy of PySequence tests. Look also at PyDict and PySet tests.

    Reacted by Kalyan R
  11. skirpichev commented on Nov 1, 2023

    @skirpichev
    skirpichev
    on Nov 1, 2023
    Member
    More actions

    With multiple prs, Modules/Setup.stdlib.in will produce merge conflicts. (I already have fixed this a lot in #109647.) I will create a pr to add stub files for testing modules.

    Edit:
    #111586 - stub files for test modules
    #111591 - tests for PyComplex C API on top of #111586

    Then I'll add missing tests for PyFloat's C API.

  12. skirpichev
    added a commit that references this issue on Nov 1, 2023

    pythongh-111495: add stub files for test modules

    c6cd397
  13. 75 remaining items

  14. ebonnal
    added a commit that references this issue on Jan 12, 2025

    pythongh-111495: improve test coverage of codecs C API (pythonGH-126030)

    2ea6baa
  15. vstinner
    added 4 commits that reference this issue on Jan 18, 2025

    pythongh-111495: Add more tests on PyEval C APIs (python#122789)

    3c6bc1b

    pythongh-111495: Fix refleaks in test_capi.test_eval tests (python#12…

    bd66480

    [3.13] gh-111495: Add more tests on PyEval C APIs (#122789) (#128987)

    430ccbc

    [3.12] gh-111495: Add more tests on PyEval C APIs (#122789) (#128987) (…

    fceb8c3
  16. vstinner
    added 4 commits that reference this issue on Jan 29, 2025

    pythongh-111495: Add PyFile tests

    c03e053

    pythongh-111495: Add PyFile tests

    5156f46

    gh-111495: Add PyFile tests (#129449)

    4ca9fc0

    pythongh-111495: Add PyFile tests (python#129449)

    d095500
  17. vstinner commented on Jan 30, 2025

    @vstinner
    vstinner
    on Jan 30, 2025
    Member
    More actions

    @serhiy-storchaka: I added tests on the PyFile C API with #129449. It was the last checkbox. Can we close this issue now?

  18. vstinner
    added 2 commits that reference this issue on Jan 30, 2025

    [3.13] gh-111495: Add PyFile tests (#129449) (#129477)

    9a59a51

    [3.12] gh-111495: Add PyFile tests (#129449) (#129477) (#129501)

    48f08fe
  19. vstinner commented on Feb 6, 2025

    @vstinner
    vstinner
    on Feb 6, 2025
    Member
    More actions

    I close the issue. A lot of work has been done in this issue!

    If someone wants to continue this work, I suggest to open new issues such as #117968.

    Reacted by Cody Maloney
  20. vstinner
    closed this as completedon Feb 6, 2025
  21. srinivasreddy
    added a commit that references this issue on Feb 7, 2025

    pythongh-111495: Add PyFile tests (python#129449)

    60f4d96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @serhiy-storchaka
    serhiy-storchaka

Labels

3.12only security fixesonly security fixes3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixestestsTests in the Lib/test dirTests in the Lib/test dirtopic-C-API

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.