Guido van Rossum added the comment:

Agreed that that is probably unrelated.

I suspect that all tests doing real I/O (stuff that goes through the OS kernel) 
and wait for it using run_briefly() are theoretically broken like that. It may 
just be harder to provoke for some tests than for others.

The proper fix is to use test_utils.run_until(loop, <predicate>, timeout) where 
<predicate> is a lambda that computes whether the desired condition is reached. 
 E.g. in this case we could use something like

test_utils.run_until(self.loop, lambda: b''.join(bytes_read) == b'abcdef', 10)

instead of the last five lines of the test (starting with the second 
run_briefly).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19740>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to