Skip to content

Check the raw streams in test_reader_not_writable and test_writer_not_readable - #304

Merged
rhpvorderman merged 1 commit into
pycompression:developfrom
ptweezy:test-threaded-raw-readable
Oct 28, 2026
Merged

rhpvorderman merged 1 commit into
pycompression:developfrom
ptweezy:test-threaded-raw-readable

Conversation

@ptweezy

@ptweezy ptweezy commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

io.BufferedReader.writable() and io.BufferedWriter.readable() return False without asking the raw stream, so these two tests can't fail. This PR checks f.raw.writable() and f.raw.readable() instead.

To test it, I made _ThreadedGzipReader.writable() return True, and in another copy, _ThreadedGzipWriter.readable(). In each case, the old test passes, and the new one fails.

This PR changes only tests, so it has no CHANGELOG entry.

Checklist

  • Pull request details were added to CHANGELOG.rst
  • Documentation was updated (if needed)

…_readable

io.BufferedReader.writable() and io.BufferedWriter.readable() return False without asking the raw stream, so the tests could not fail.
@rhpvorderman
rhpvorderman merged commit e7dcb20 into pycompression:develop Oct 28, 2026
22 checks passed
@rhpvorderman

Copy link
Copy Markdown
Collaborator

Thanks!

@ptweezy
ptweezy deleted the test-threaded-raw-readable branch October 28, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants