Skip to content

Commit

Permalink
A little more coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinche committed Nov 29, 2023
1 parent e82a5d0 commit d933a39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_fail_after.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,9 @@ async def test_fail_after_inner_unrelated_exc() -> None:
assert first.cancelled_caught
curr = current_task()
assert curr and curr.cancelling() == 0


async def test_deadline_expired_on_enter() -> None:
"""Past deadlines work on entering the scope."""
with pytest.raises(TimeoutError), fail_after(0):
await sleep(1)

0 comments on commit d933a39

Please sign in to comment.