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
Add tests for asyncio _FlowControlMixin exception handling in pause_writing #150361
While normal flow-control behavior is covered by existing tests, the exception
handling branch (when pause_writing() raises an error) is not explicitly
tested.
Proposed test coverage
This issue proposes adding a unit test to ensure that:
protocol.pause_writing() is called when write buffer exceeds high-water mark
If pause_writing() raises an exception:
loop.call_exception_handler() is invoked
The exception object is correctly passed to the handler
The error message contains "protocol.pause_writing() failed"
The transport remains in _protocol_paused = True state
Why this matters
This behavior is part of asyncio’s flow control robustness and ensures that
protocol-level errors do not silently break transport state transitions.
Explicit testing prevents regressions in error-handling logic inside _FlowControlMixin.
Activity
gh-150361: add test for FlowControlMixin pause_writing exception hand…
pythongh-150361: add test for FlowControlMixin pause_writing exceptio…