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
This set of changes takes ./python -m test test_io -uall,walltime,largefile,extralargefile -M16G -j8 from ~34.5s -> ~31.6s for me (64 bit linux workstation).
That should help reduce the CI long tail a bit (test_io on refleaks builds is often among the "10 slowest tests"). The reduced runtime is largely from increased parallelism (buffered tests run in parallel with other test_io tests now). If you want to test locally, that's the two outstanding PRs + one commit to do the split (cmaloney@cca2b2e)
Activity
pythongh-138013: Remove `test_io` load_tests namespace manipulation
pythongh-138013: Remove `test_io` load_tests namespace manipulation
cmaloney commentedon Sep 2, 2025
This set of changes takes
./python -m test test_io -uall,walltime,largefile,extralargefile -M16G -j8from ~34.5s -> ~31.6s for me (64 bit linux workstation).That should help reduce the CI long tail a bit (
test_ioon refleaks builds is often among the "10 slowest tests"). The reduced runtime is largely from increased parallelism (buffered tests run in parallel with othertest_iotests now). If you want to test locally, that's the two outstanding PRs + one commit to do the split (cmaloney@cca2b2e)gh-138013: Move I/O tests to test_io (#138365)
gh-138013: Remove `test_io` load_tests namespace manipulation (#138366)
pythongh-138013: Move buffered tests to test_bufferedio
pythongh-138013: Make ``test.test_io`` into a package (python#138153)
pythongh-138013: Move I/O tests to test_io (python#138365)
pythongh-138013: Remove `test_io` load_tests namespace manipulation (p…
pythongh-138013: Remove load_tests in test_io.test_general
gh-138013: Move I/O test infrastructre to test_io.utils (#138475)
gh-138013: Remove load_tests in test_io.test_general (#138771)
pythongh-138013 Split SignalsTest from test_io.test_general
pythongh-138013 Split SignalsTest from test_io.test_general
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!