Skip to content

Commit

Permalink
Tweak 2 tests reported failing for some
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Booth committed May 1, 2019
1 parent a7f953e commit 08a221f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/test_curio.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async def test_tg_spawn():

@pytest.mark.asyncio
async def test_tg_cancel_remaining():
tasks = [await spawn(sleep, x/500) for x in range(1, 4)]
tasks = [await spawn(sleep, x/200) for x in range(1, 4)]
t = TaskGroup(tasks)
assert await t.next_done()
await t.cancel_remaining()
Expand Down Expand Up @@ -733,12 +733,8 @@ async def test_ignore_after_no_expire():
async def t1(*values):
return await return_after_sleep(1 + sum(values), 0.001)

try:
assert await ignore_after(0.002, t1, 1) == 2
except:
assert False
assert await ignore_after(0.005, t1, 1) == 2
await sleep(0.002)
assert True


@pytest.mark.asyncio
Expand Down

0 comments on commit 08a221f

Please sign in to comment.