cpython/Lib/test/test_io
Cody Maloney db68bfc771
gh-138720: Make Buffered closed check match flush (GH-138724)
In `_io__Buffered_flush_impl` the macro `CHECK_CLOSED` is used to check
the `buffered*` is in a good state to be flushed. That differs slightly
from `buffered_closed`.

In some cases, that difference would result in `close()` thinking the
file needed to be flushed and closed while `flush()` thought the file
was already closed.

This could happen during GC and would result in an unraisable exception.
2025-09-18 12:02:29 +02:00
..
__init__.py gh-138013: Move I/O tests to test_io (#138365) 2025-09-03 11:37:06 +02:00
__main__.py
test_bufferedio.py gh-138013: Move I/O tests to test_io (#138365) 2025-09-03 11:37:06 +02:00
test_file.py gh-138013: Move I/O tests to test_io (#138365) 2025-09-03 11:37:06 +02:00
test_fileio.py gh-138013: Move I/O tests to test_io (#138365) 2025-09-03 11:37:06 +02:00
test_general.py gh-138720: Make Buffered closed check match flush (GH-138724) 2025-09-18 12:02:29 +02:00
test_largefile.py gh-138013: Move I/O tests to test_io (#138365) 2025-09-03 11:37:06 +02:00
test_memoryio.py gh-138013: Move I/O tests to test_io (#138365) 2025-09-03 11:37:06 +02:00
test_univnewlines.py gh-138013: Move I/O tests to test_io (#138365) 2025-09-03 11:37:06 +02:00
utils.py gh-138013: Move I/O test infrastructre to test_io.utils (#138475) 2025-09-11 12:45:30 +02:00