()
| 114 | holder.start() |
| 115 | |
| 116 | async def measure() -> float: |
| 117 | task = asyncio.ensure_future(AsyncFileLock(path).acquire(poll_interval=0.01)) |
| 118 | await asyncio.sleep(0.02) |
| 119 | started = time.perf_counter() |
| 120 | task.cancel() |
| 121 | with suppress(asyncio.CancelledError): |
| 122 | await task |
| 123 | return time.perf_counter() - started |
| 124 | |
| 125 | try: |
| 126 | acquired.wait(timeout=5) |
no test coverage detected