(
tmp_path: Path, instance_timeout: float, *, instance_blocking: bool, shared: bool
)
| 201 | |
| 202 | @pytest_asyncio.fixture(loop_scope="function") # Join shutdown workers before later fork tests. |
| 203 | async def async_locks( |
| 204 | tmp_path: Path, instance_timeout: float, *, instance_blocking: bool, shared: bool |
| 205 | ) -> AsyncIterator[tuple[AsyncReadWriteLock, AsyncReadWriteLock]]: |
| 206 | holder: Final[AsyncReadWriteLock] = AsyncReadWriteLock( |
| 207 | tmp_path / "a", timeout=instance_timeout, blocking=instance_blocking, is_singleton=False |
| 208 | ) |
| 209 | contender: Final[AsyncReadWriteLock] = ( |
| 210 | holder |
| 211 | if shared |
| 212 | else AsyncReadWriteLock( |
| 213 | tmp_path / "a", timeout=instance_timeout, blocking=instance_blocking, is_singleton=False |
| 214 | ) |
| 215 | ) |
| 216 | try: |
| 217 | yield holder, contender |
| 218 | finally: |
| 219 | await holder.close() |
| 220 | await contender.close() |
nothing calls this directly
no test coverage detected