Skip to content

[3.12] gh-117968: Make the test for closed file more safe in the C API tests (GH-118230)#118266

Merged
serhiy-storchaka merged 1 commit into
python:3.12from
miss-islington:backport-546cbcf-3.12
Apr 25, 2024
Merged

[3.12] gh-117968: Make the test for closed file more safe in the C API tests (GH-118230)#118266
serhiy-storchaka merged 1 commit into
python:3.12from
miss-islington:backport-546cbcf-3.12

Conversation

@miss-islington
Copy link
Copy Markdown
Contributor

@miss-islington miss-islington commented Apr 25, 2024

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.
(cherry picked from commit 546cbcf)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com

… tests (pythonGH-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.
(cherry picked from commit 546cbcf)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants