]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-117968: Make the test for closed file more safe in the C API tests (GH-118230)
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 25 Apr 2024 05:00:42 +0000 (08:00 +0300)
committerGitHub <noreply@github.com>
Thu, 25 Apr 2024 05:00:42 +0000 (08:00 +0300)
commit546cbcfa0eeeb533950bd49e30423f3d3bbd5ebe
tree4096698bc896c85dad8072363bddc2e8464b1127
parent4b10e209c76f9f36f8ae2e4d713b3a01591c1856
gh-117968: Make the test for closed file more safe in the C API tests (GH-118230)

The behavior of fileno() after fclose() is undefined, but it is the only
practical way to check whether the file was closed.
Only test this on the known platforms (Linux, Windows, macOS), where we
already tested that it works.
Modules/_testcapi/run.c