Skip to content

Commit

Permalink
Amended test_eager_task_factory to check that fetching the task state…
Browse files Browse the repository at this point in the history
… works
  • Loading branch information
agronholm committed Nov 23, 2024
1 parent f25559c commit 4495f78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_taskgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,9 @@ async def typetest_optional_status(
@pytest.mark.parametrize("anyio_backend", ["asyncio"])
async def test_eager_task_factory(request: FixtureRequest) -> None:
async def sync_coro() -> None:
pass
# This should trigger fetching the task state
with CancelScope(): # noqa: ASYNC100
pass

loop = asyncio.get_running_loop()
old_task_factory = loop.get_task_factory()
Expand Down

0 comments on commit 4495f78

Please sign in to comment.