Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

miss-islington
Copy link
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 [email protected]

… 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 <[email protected]>
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) April 25, 2024 05:01
@serhiy-storchaka serhiy-storchaka merged commit 33d1cff into python:3.12 Apr 25, 2024
27 checks passed
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