Skip to content

Commit

Permalink
Remove dependence of test on time idiosyncracies
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Booth committed Aug 8, 2018
1 parent ffda59a commit e5fd080
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_curio.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ async def test_tg_cm_all():

@pytest.mark.asyncio
async def test_tg_join_any():
tasks = [await spawn(sleep, x/200) for x in range(5, 0, -1)]
tasks = [await spawn(sleep, 0.001 + x) for x in range(0, 5)]
t = TaskGroup(tasks)
await t.join(wait=any)
assert all(task.done() for task in tasks)
assert all(task.cancelled() for task in tasks[:-1])
assert not tasks[-1].cancelled()
assert all(task.cancelled() for task in tasks[1:])
assert not tasks[0].cancelled()


@pytest.mark.asyncio
Expand Down

0 comments on commit e5fd080

Please sign in to comment.