-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Add more C API tests #111495
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
Comments
@serhiy-storchaka, initial set of C API tests for PyComplex (only for changed functions) was added in #109647 |
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. |
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. |
@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.) |
Good catch, @skirpichev. I forgot to add the actual test files. |
@serhiy-storchaka , I would like to contribute tests to PyTuple and PyList C API |
Great. Look at existing PySequence tests in |
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: Then I'll add missing tests for PyFloat's C API. |
This is to reduce merge conflicts (Modules/Setup.stdlib.in) for subsequent pull requests for the issue.
This is to reduce merge conflicts (Modules/Setup.stdlib.in) for subsequent pull requests for the issue.
Good idea! |
This is to reduce merge conflicts (Modules/Setup.stdlib.in) for subsequent pull requests for the issue.
…GH-111586) This is to reduce merge conflicts (Modules/Setup.stdlib.in) for subsequent pull requests for the issue. (cherry picked from commit 33ed5fa) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
I am working on |
Signed-off-by: kalyanr <kalyan.ben10@live.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
For now, skip some crashers (tracked in pythongh-123378).
For now, skip some crashers (tracked in pythongh-123378).
* Add Lib/test/test_capi/test_eval.py * Add Modules/_testlimitedcapi/eval.c (cherry picked from commit bf8b374)
Add tests for the following functions in test_capi.test_file: * PyFile_FromFd() * PyFile_GetLine() * PyFile_NewStdPrinter() * PyFile_WriteObject() * PyFile_WriteString() * PyObject_AsFileDescriptor() Add Modules/_testlimitedcapi/file.c file. Remove now redundant test_embed.StdPrinterTests.
Add tests for the following functions in test_capi.test_file: * PyFile_FromFd() * PyFile_GetLine() * PyFile_NewStdPrinter() * PyFile_WriteObject() * PyFile_WriteString() * PyObject_AsFileDescriptor() Add Modules/_testlimitedcapi/file.c file. Remove now redundant test_embed.StdPrinterTests.
Add tests for the following functions in test_capi.test_file: * PyFile_FromFd() * PyFile_GetLine() * PyFile_NewStdPrinter() * PyFile_WriteObject() * PyFile_WriteString() * PyObject_AsFileDescriptor() Add Modules/_testlimitedcapi/file.c file. Remove test_embed.StdPrinterTests which became redundant.
Add tests for the following functions in test_capi.test_file: * PyFile_FromFd() * PyFile_GetLine() * PyFile_NewStdPrinter() * PyFile_WriteObject() * PyFile_WriteString() * PyObject_AsFileDescriptor() Add Modules/_testlimitedcapi/file.c file. Remove test_embed.StdPrinterTests which became redundant. (cherry picked from commit 4ca9fc0)
@serhiy-storchaka: I added tests on the PyFile C API with #129449. It was the last checkbox. Can we close this issue now? |
gh-111495: Add PyFile tests (#129449) Add tests for the following functions in test_capi.test_file: * PyFile_FromFd() * PyFile_GetLine() * PyFile_NewStdPrinter() * PyFile_WriteObject() * PyFile_WriteString() * PyObject_AsFileDescriptor() Add Modules/_testlimitedcapi/file.c file. Remove test_embed.StdPrinterTests which became redundant. (cherry picked from commit 4ca9fc0)
[3.13] gh-111495: Add PyFile tests (#129449) (#129477) gh-111495: Add PyFile tests (#129449) Add tests for the following functions in test_capi.test_file: * PyFile_FromFd() * PyFile_GetLine() * PyFile_NewStdPrinter() * PyFile_WriteObject() * PyFile_WriteString() * PyObject_AsFileDescriptor() Remove test_embed.StdPrinterTests which became redundant. (cherry picked from commit 4ca9fc0) (cherry picked from commit 9a59a51)
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. |
Add tests for the following functions in test_capi.test_file: * PyFile_FromFd() * PyFile_GetLine() * PyFile_NewStdPrinter() * PyFile_WriteObject() * PyFile_WriteString() * PyObject_AsFileDescriptor() Add Modules/_testlimitedcapi/file.c file. Remove test_embed.StdPrinterTests which became redundant.
Linked PRs
PyFile_*
CAPI tests #111709PyCodec_*
C API #123343The text was updated successfully, but these errors were encountered: