Skip to content

Commit

Permalink
Add a kbi fast daemon cancel test
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Nov 29, 2021
1 parent ac821bd commit 7ffc22d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_cancellation.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,3 +501,20 @@ async def main():

with pytest.raises(AssertionError):
trio.run(main)


def test_fast_cancel_when_spawn_task_in_soft_proc_wait_for_daemon(
start_method,
):
async def main():
with trio.fail_after(2):
async with tractor.open_nursery() as tn:
p = await tn.start_actor(
'fast_boi',
enable_modules=[__name__],
)
await p.run(do_nuthin)
raise KeyboardInterrupt

with pytest.raises(KeyboardInterrupt):
trio.run(main)

0 comments on commit 7ffc22d

Please sign in to comment.