]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-111495: Add PyFile tests (#129449) (#129477)
authorVictor Stinner <vstinner@python.org>
Thu, 30 Jan 2025 19:29:27 +0000 (20:29 +0100)
committerGitHub <noreply@github.com>
Thu, 30 Jan 2025 19:29:27 +0000 (20:29 +0100)
commit9a59a51733e58b6091ca9157fd43cc9d0f93a96f
tree9b47b60178486706b14d526c9bd63aa1511cd432
parenta853e2f0760613dc513955ee46143f6d411d352f
[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()

Add Modules/_testlimitedcapi/file.c file.

Remove test_embed.StdPrinterTests which became redundant.

(cherry picked from commit 4ca9fc08f89bf7172d41e523d9e520eb1729ee8c)
Lib/test/test_capi/test_file.py [new file with mode: 0644]
Lib/test/test_embed.py
Modules/Setup.stdlib.in
Modules/_testcapi/clinic/file.c.h [new file with mode: 0644]
Modules/_testcapi/file.c
Modules/_testlimitedcapi.c
Modules/_testlimitedcapi/clinic/file.c.h [new file with mode: 0644]
Modules/_testlimitedcapi/file.c [new file with mode: 0644]
Modules/_testlimitedcapi/parts.h
PCbuild/_testlimitedcapi.vcxproj
PCbuild/_testlimitedcapi.vcxproj.filters