GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Move Buffered tests from test_io to test_bufio · Issue #138013 · python/cpython

Move Buffered tests from test_io to test_bufio #138013

New issue
Copy link
New issue
Copy link
Closed
#139454
Closed
Move Buffered tests from test_io to test_bufio#138013
#139454
Copy link
Assignees
cmaloney
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-IOtype-refactorCode refactoring (with no changes in behavior)Code refactoring (with no changes in behavior)

Description

@cmaloney
cmaloney
opened on Aug 21, 2025
Issue body actions

Feature or enhancement

Proposal:

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

Links to previous discussion of this feature:

No response

Linked PRs

  • gh-138013: Move test.test_io to be a module #138153
  • gh-138013: Move I/O tests to test_io #138365
  • gh-138013: Remove test_io load_tests namespace manipulation #138366
  • gh-138013: Move I/O test infrastructre to test_io.utils #138475
  • gh-138013: Remove load_tests in test_io.test_general #138771
  • gh-138013: Split SignalsTest from test_io.test_general #139079
  • gh-138013: Split TextIO tests from test_io.test_general #139173
  • gh-138013: Split BufferedIO tests from test_io.test_general #139454

Activity

Next
  1. cmaloney
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Aug 21, 2025
  2. brianschubert
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    type-refactorCode refactoring (with no changes in behavior)Code refactoring (with no changes in behavior)
    topic-IO
    and removed
    type-featureA feature request or enhancementA feature request or enhancement
    on Aug 21, 2025
  3. Aniketsy commented on Aug 24, 2025

    @Aniketsy
    Aniketsy
    on Aug 24, 2025
    Contributor
    More actions

    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!

  4. cmaloney commented on Aug 24, 2025

    @cmaloney
    cmaloney
    on Aug 24, 2025
    ContributorAuthor
    More actions

    @Aniketsy planning to work on this myself, are some special pieces in load_tests which need to be refactored as part of this.

  5. picnixz
    assigned
    cmaloney
    on Aug 24, 2025
  6. Aniketsy commented on Aug 24, 2025

    @Aniketsy
    Aniketsy
    on Aug 24, 2025
    Contributor
    More actions

    @cmaloney Thank you for clarifying, I appreciate it!

    Reacted by Cody Maloney
  7. cmaloney
    added 3 commits that reference this issue on Aug 26, 2025

    pythongh-138013: Move test.test_io to be a module

    69e16a1

    pythongh-138013: Move test.test_io to be a module

    2488d1d

    pythongh-138013: Move test.test_io to be a module

    4e0fb32
  8. AA-Turner
    added a commit that references this issue on Aug 31, 2025

    gh-138013: Make ``test.test_io`` into a package (#138153)

    15e37ea
  9. cmaloney
    added 2 commits that reference this issue on Sep 1, 2025

    pythongh-138013: Move I/O tests to test_io

    febe883

    pythongh-138013: Move I/O tests to test_io

    ff31213
  10. 14 remaining items

  11. cmaloney
    added 3 commits that reference this issue on Sep 17, 2025

    pythongh-138013 Split SignalsTest from test_io.test_general

    f102a9f

    pythongh-138013: Split TextIO tests from test_general

    49aefe5

    pythongh-138013: Split TextIO tests from test_general

    aa90f01
  12. vstinner
    added a commit that references this issue on Sep 19, 2025

    gh-138013: Split SignalsTest from test_io.test_general (#139079)

    69c6b43
  13. cmaloney
    added a commit that references this issue on Sep 19, 2025

    pythongh-138013: Split TextIO tests from test_general

    6704471
  14. vstinner
    added a commit that references this issue on Sep 30, 2025

    gh-138013: Split TextIO tests from test_io.test_general (#139173)

    f752fde
  15. vstinner commented on Sep 30, 2025

    @vstinner
    vstinner
    on Sep 30, 2025
    Member
    More actions

    Can we close this issue? Or do you plan to split more tests?

  16. cmaloney
    added 3 commits that reference this issue on Sep 30, 2025

    pythongh-138013: Split buffered tests out

    57d77e2

    pythongh-138013: Split buffered tests out

    0e3a1a4

    pythongh-138013: Split BufferedIO tests from test_io.test_general

    ac621e8
  17. cmaloney commented on Sep 30, 2025

    @cmaloney
    cmaloney
    on Sep 30, 2025
    ContributorAuthor
    More actions

    One final split then done GH-139454

  18. vstinner
    added a commit that references this issue on Oct 1, 2025

    gh-138013: Split BufferedIO tests from test_io.test_general (#139454)

    ce23eea
  19. vstinner
    closed this as completedin #139454on Oct 1, 2025
  20. vstinner commented on Oct 1, 2025

    @vstinner
    vstinner
    on Oct 1, 2025
    Member
    More actions

    Nice work, thanks @cmaloney!

    Reacted by Cody Maloney
  21. cmaloney commented on Oct 1, 2025

    @cmaloney
    cmaloney
    on Oct 1, 2025
    ContributorAuthor
    More actions

    Thanks for reviewing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @cmaloney
    cmaloney

Labels

testsTests in the Lib/test dirTests in the Lib/test dirtopic-IOtype-refactorCode refactoring (with no changes in behavior)Code refactoring (with no changes in behavior)

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.