-
-
Notifications
You must be signed in to change notification settings - Fork 379
Description
It turns out that currently, check_one_way_stream never attempts to transfer more than 1 byte at a time. In fact, the do_receive_some helper takes a max_bytes parameter, but ignores it and calls receive_some(1) anyway (whoops).
(This was discovered while reviewing the subprocess support PR, see #791 (comment))
This is not so great, because in many stream implementations, bulk transfers involve different logic than single-byte transfers (due to filling up receive buffers, partial sends, etc.). check_one_way_stream should try sending a big chunk of data and making sure it gets through correctly.
There are individual versions of this test in test_*_pipes.py, and probably elsewhere too (maybe in the SocketStream tests). If these become redundant we can drop them to speed up the test suite.