[issue19740] test_asyncio problems on 32-bit Windows

Guido van Rossum report at bugs.python.org
Sun Nov 24 20:01:35 CET 2013


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 <report at bugs.python.org>
<http://bugs.python.org/issue19740>
_______________________________________


More information about the Python-bugs-list mailing list