GeezerVison is showing github.com — test_cppext does not import/run the C++ extension · Issue #94751 · python/cpython
test_cppext does not import/run the C++ extension #94751
Description
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.
Reacted by Michael Droettboom
Activity
encukou commented on Jul 12, 2022
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
vstinner commented on Aug 3, 2022
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).
Metadata
Metadata
Development
No branches or pull requestsIssue actions