On Sat, 25 Jan 2014 15:02:56 +0100 (CET) victor.stinner <python-checkins at python.org> wrote: > + > + @tasks.coroutine > + def wait(): > + loop = self.loop > + calls.append(loop._run_once_counter) > + yield from tasks.sleep(loop.granularity * 10, loop=loop) > + calls.append(loop._run_once_counter) > + yield from tasks.sleep(loop.granularity / 10, loop=loop) > + calls.append(loop._run_once_counter) > + > + self.loop.run_until_complete(wait()) > + calls.append(self.loop._run_once_counter) > + self.assertEqual(calls, [1, 3, 5, 6]) Could you add a comment explaining the number of calls to run_once()? For example, why does it jump from 1 to 3 and then 3 to 5, rather than 1 to 2 and then 2 to 3? Regards Antoine.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4