Skip to content

Commit

Permalink
add a test for await maybe_async(current_task())
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed May 12, 2021
1 parent fcc28ea commit 010c435
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ async def test_get_running_tasks(self):
tasks = await maybe_async(get_running_tasks())
assert type(tasks) is list

async def test_get_current_task(self):
task = await maybe_async(get_current_task)
assert type(task) is TaskInfo


async def test_maybe_async_cm():
async with maybe_async_cm(CancelScope()):
Expand Down

0 comments on commit 010c435

Please sign in to comment.