You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Move Buffered tests from test_io to test_bufio #138013
test_io is currently over 5000 lines long and tests a range of behaviors of lots of distinct io components. Some work to make it more modular has happened over time and there are a number of tests for specific subsets of io behavior (see: https://github.com/python/cpython/blob/main/Lib/test/test_io.py#L3-L13), including one for Buffered I/O (test_bufio.py, 74 lines currently)
About 1200 lines of test_io are Buffered I/O specific tests which are well isolated / can be moved relatively easily (BufferedReaderTest, BufferedWriterTest, BufferedRWPairTest, and BufferedRandomTest as well as their Py*/C* variants). I'd like to move them from test_io to test_bufio to make it simpler/faster to iterate / test / validate Buffered I/O behavior.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Hi @cmaloney
Before I start working on moving the Buffered I/O-specific tests from test_io.py to test_bufio.py, I just wanted to check in and confirm if it’s okay to proceed. I’d also appreciate any guidance or considerations you’d like me to keep in mind while making this change.
Activity
Aniketsy commentedon Aug 24, 2025
Hi @cmaloney
Before I start working on moving the Buffered I/O-specific tests from test_io.py to test_bufio.py, I just wanted to check in and confirm if it’s okay to proceed. I’d also appreciate any guidance or considerations you’d like me to keep in mind while making this change.
Thank you!
cmaloney commentedon Aug 24, 2025
@Aniketsy planning to work on this myself, are some special pieces in load_tests which need to be refactored as part of this.
Aniketsy commentedon Aug 24, 2025
@cmaloney Thank you for clarifying, I appreciate it!
pythongh-138013: Move test.test_io to be a module
pythongh-138013: Move test.test_io to be a module
pythongh-138013: Move test.test_io to be a module
gh-138013: Make ``test.test_io`` into a package (#138153)
pythongh-138013: Move I/O tests to test_io
pythongh-138013: Move I/O tests to test_io
14 remaining items
pythongh-138013 Split SignalsTest from test_io.test_general
pythongh-138013: Split TextIO tests from test_general
pythongh-138013: Split TextIO tests from test_general
gh-138013: Split SignalsTest from test_io.test_general (#139079)
pythongh-138013: Split TextIO tests from test_general
gh-138013: Split TextIO tests from test_io.test_general (#139173)
vstinner commentedon Sep 30, 2025
Can we close this issue? Or do you plan to split more tests?
pythongh-138013: Split buffered tests out
pythongh-138013: Split buffered tests out
pythongh-138013: Split BufferedIO tests from test_io.test_general
cmaloney commentedon Sep 30, 2025
One final split then done GH-139454
gh-138013: Split BufferedIO tests from test_io.test_general (#139454)
vstinner commentedon Oct 1, 2025
Nice work, thanks @cmaloney!
cmaloney commentedon Oct 1, 2025
Thanks for reviewing!