Skip to content

Commit

Permalink
uasyncio.core: test_fair_schedule.py: More checks and iterations.
Browse files Browse the repository at this point in the history
  • Loading branch information
pfalcon committed Feb 4, 2018
1 parent 5925aa6 commit bc14f2f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions uasyncio.core/test_fair_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
import uasyncio.core as asyncio


COROS = 5
ITERS = 5
COROS = 10
ITERS = 20


result = []
test_finished = False


async def coro(n):
Expand All @@ -18,10 +19,12 @@ async def coro(n):


async def done():
global test_finished
while True:
if len(result) == COROS * ITERS:
#print(result)
assert result == list(range(COROS)) * ITERS
test_finished = True
return
yield

Expand All @@ -32,3 +35,5 @@ async def done():
loop.create_task(coro(n))

loop.run_until_complete(done())

assert test_finished

0 comments on commit bc14f2f

Please sign in to comment.