Skip to content
Myr

concurrency.py

This file

Path

tests/concurrency.py

15 lines · 323 bytes · Python

Last changed by

Increase test coverage - take 2 (#1012)Josep Cugatbefore adoption620b067

History of this file

Take it

The walk stopped after 200 commits: lines older than d6b3794 point at it.

Attempt to resolve test flakiness (#946)Tom Christiebefore adoptiond6b3794

line 1why, one step back
1"""

Remove unused concurrency test utils (#989)Florimond Mancabefore adoption440b5ab

line 2why, one step back
2Async environment-agnostic concurrency utilities that are only used in tests.

Attempt to resolve test flakiness (#946)Tom Christiebefore adoptiond6b3794

lines 3–10why, one step back
3"""
45import asyncio67import sniffio8import trio910

Remove unused concurrency test utils (#989)Florimond Mancabefore adoption440b5ab

line 11why, one step back
11async def sleep(seconds: float) -> None:

Attempt to resolve test flakiness (#946)Tom Christiebefore adoptiond6b3794

line 12why, one step back
12 if sniffio.current_async_library() == "trio":

Increase test coverage - take 2 (#1012)Josep Cugatbefore adoption620b067

line 13why, one step back
13 await trio.sleep(seconds) # pragma: nocover

Attempt to resolve test flakiness (#946)Tom Christiebefore adoptiond6b3794

lines 14–15why, one step back
14 else:
15 await asyncio.sleep(seconds)