]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-111495: Add PyFile tests (#129449) (#129477) (#129501)
authorVictor Stinner <vstinner@python.org>
Fri, 31 Jan 2025 09:27:35 +0000 (10:27 +0100)
committerGitHub <noreply@github.com>
Fri, 31 Jan 2025 09:27:35 +0000 (10:27 +0100)
commit48f08fe6c8023b852b642c130dda74f35d5997cd
treee15035b6376a3bbd66f56714bc7499f8ab6510aa
parentd2f551db12a779be30e23d031333b7f070c9a711
[3.12] gh-111495: Add PyFile tests (#129449) (#129477) (#129501)

[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 4ca9fc08f89bf7172d41e523d9e520eb1729ee8c)
(cherry picked from commit 9a59a51733e58b6091ca9157fd43cc9d0f93a96f)
Lib/test/test_capi/test_file.py [new file with mode: 0644]
Lib/test/test_embed.py
Modules/_testcapi/clinic/file.c.h [new file with mode: 0644]
Modules/_testcapi/file.c