concurrency.py
This file
Path
tests/concurrency.py
15 lines · 324 bytes · Python
Last changed by
use # pragma: no cover instead of # pragma: nocover (#2471)Adrian Garcia Badaraccobefore adoption16e2830
History of this fileTake it
The walk stopped after 200 commits: lines older than 3b1578f point at it.
Bump mypy from 0.971 to 0.982 (#2427)dependabot[bot]before adoption3b1578f
lines 1–12why, one step back1"""2Async environment-agnostic concurrency utilities that are only used in tests.3"""45import asyncio67import sniffio8import trio91011async def sleep(seconds: float) -> None:12 if sniffio.current_async_library() == "trio":use # pragma: no cover instead of # pragma: nocover (#2471)Adrian Garcia Badaraccobefore adoption16e2830
line 13why, one step back13 await trio.sleep(seconds) # pragma: no coverBump mypy from 0.971 to 0.982 (#2427)dependabot[bot]before adoption3b1578f
lines 14–15why, one step back14 else:15 await asyncio.sleep(seconds)