]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-118422: Fix run_fileexflags() test (#118429)
authorVictor Stinner <vstinner@python.org>
Tue, 30 Apr 2024 20:32:55 +0000 (22:32 +0200)
committerGitHub <noreply@github.com>
Tue, 30 Apr 2024 20:32:55 +0000 (22:32 +0200)
commite93c39b47ea623dfaf61f80775ad4747b163efe5
tree0747773aa2298b73ff300c94dae89974dfc8f796
parent587388ff22dc7cfa4b66722daf0d33cd804af9f2
gh-118422: Fix run_fileexflags() test (#118429)

Don't test the undefined behavior of fileno()
on a closed file, but use fstat() as a reliable
test if the file was closed or not.
Include/internal/pycore_fileutils.h
Modules/_testcapi/run.c
Python/fileutils.c
Python/pylifecycle.c