summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_cppext.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-94731: Revert to C-style casts for _Py_CAST (GH-94782)Petr Viktorin2022-07-141-0/+6
| | | Co-authored-by: da-woods <dw-git@d-woods.co.uk>
* gh-94751: Install, import and run the test C++ extension (MVP) (GH-94754)Petr Viktorin2022-07-121-16/+41
| | | | | | | | | This is a quick-and-dirty way to run the C++ tests. It can definitely be improved in the future, but it should fail when things go wrong. - Run test functions on import (yes, this can definitely be improved) - Fudge setuptools metadata (name & version) to make the extension installable - Install and import the extension in test_cppext
* gh-91321: Fix compatibility with C++ older than C++11 (#93784)Victor Stinner2022-06-141-13/+25
| | | | | Fix the compatibility of the Python C API with C++ older than C++11. _Py_NULL is only defined as nullptr on C++11 and newer.
* gh-92820: Skip test_cppext if _ctypes is missing (#92844)Victor Stinner2022-05-161-0/+2
| | | Add @test.support.requires_venv_with_pip decorator.
* gh-92584: test_cppext uses setuptools (#92639)Victor Stinner2022-05-121-67/+35
| | | | Rewrite test_cppext to run in a virtual environment and to build the C++ extension with setuptools rather than distutils.
* gh-92135: test_cppext requires subprocess (GH-92349)Christian Heimes2022-05-051-0/+1
|
* gh-91321: Add _Py_NULL macro (#92253)Victor Stinner2022-05-031-0/+2
| | | | | | | | Fix C++ compiler warnings: "zero as null pointer constant" (clang -Wzero-as-null-pointer-constant). * Add the _Py_NULL macro used by static inline functions to use nullptr in C++. * Replace NULL with nullptr in _testcppext.cpp.
* gh-91320: Fix more old-style cast warnings in C++ (#92247)Victor Stinner2022-05-031-0/+2
| | | | | | | Use _Py_CAST(), _Py_STATIC_CAST() and _PyASCIIObject_CAST() in static inline functions to fix C++ compiler warnings: "use of old-style cast" (clang -Wold-style-cast). test_cppext now builds the C++ test extension with -Wold-style-cast.
* gh-92135: Fix _Py_reinterpret_cast() for const (#92138)Victor Stinner2022-05-021-5/+13
| | | | | | | | | | Fix C++ compiler warnings on cast macros, like _PyObject_CAST(), when casting a constant expression to a non constant type: use const_cast<> in C++. * In C++, Py_SAFE_DOWNCAST() now uses static_cast<> rather than reinterpret_cast<>. * Add tests to the _testcppext C++ extension. * test_cppext no longer captures stdout in verbose mode.
* gh-91321: Add _testcppext C++ extension (#32175)Victor Stinner2022-05-021-0/+79
Build a basic C++ test extension to check that the Python C API is compatible with C++ and does not emit C++ compiler warnings. * Add Modules/_testcppext.cpp: C++ extension * Add Lib/test/test_cppext.py: test building the C++ extension.