STINNER Victor added the comment: Here is a patch with a simple unit test.
I chose to modify the pause_reading method of the transport instead of mocking "everything" to test the real code (have a better code coverage). ---------- Added file: http://bugs.python.org/file37135/set_transport-2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22685> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com