Skip to content

test_cppext does not import/run the C++ extension #94751

Description

@encukou

The test_cppext test case only checks that the C++ extension builds. It does not import and run test cases, so it can't catch runtime issues like #94731.

Activity

  1. added a commit that references this issue on Jul 12, 2022
  2. added a commit that references this issue on Jul 12, 2022
  3. encukou commented on Jul 12, 2022

    @encukou
    MemberAuthor

    Merged the MVP, but there's still work to do:

    • running setup.py is deprecated, we should probably build/install using pip
    • the tests could be run individually, so the first failure doesn't mask others
  4. added a commit that references this issue on Jul 13, 2022
  5. vstinner commented on Aug 3, 2022

    @vstinner
    Member

    The test_cppext test case only checks that the C++ extension builds

    Right, for now it's its only purpose as written at top of Lib/test/_testcppext.cpp:

    // gh-91321: Very basic C++ test extension to check that the Python C API is
    // compatible with C++ and does not emit C++ compiler warnings.
    

    And Lib/test/test_cppext.py:

    # gh-91321: Build a basic C++ test extension to check that the Python C API is
    # compatible with C++ and does not emit C++ compiler warnings.
    

    The reason is that I was too lazy to finish the work to actually import the built extension. I got enough C++ issues to handle. By the way, it seems like most of the work to fix C++ warnings has been reverted by commit 6cbb57f.

    I also got busy with replacing distutils with setuptools (using venv).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions