asyncio
asyncio copied to clipboard
"Simulated time" used in the unit tests is too hard to understand
I've spent a fair amount of time twice today debugging issues with the
simulated time as implemented by asyncio.test_util.TestLoop, trying to modify
the generator passed in to the constructor to deal with a different sequence of
events. I've heard from others about this too.
I still can't even explain how it works -- I just gave up and copied-and-pasted
some code from another test that had the desired effect.
Can we please replace the current machinery with something more understandable?
Original issue reported on code.google.com by [email protected] on 9 Feb 2014 at 4:29
> Can we please replace the current machinery with something more
understandable?
Why not using a real event loop instead of mocking almost everything in most
tests?
Original comment by [email protected] on 11 Feb 2014 at 10:59
> Why not using a real event loop
Because then the tests take too long. This was introduced to speed up test
running, for which I am super grateful. See
http://code.google.com/p/tulip/source/detail?r=b6d39b987d4a
Original comment by [email protected] on 11 Feb 2014 at 5:35