fix: Use anyio for file operations in a few places (#5167)

Use anyio for file operations in a few places
This commit is contained in:
Christophe Bornet 2024-12-10 02:55:42 +01:00 • committed by GitHub
commit e545d12c40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 36 additions and 30 deletions

View file

@ -10,6 +10,7 @@ from pathlib import Path
from typing import TYPE_CHECKING
from uuid import UUID
import anyio
import orjson
import pytest
from asgi_lifespan import LifespanManager
@ -365,7 +366,7 @@ async def client_fixture(
monkeypatch.undo()
# clear the temp db
with suppress(FileNotFoundError):
db_path.unlink()
await anyio.Path(db_path).unlink()
# create a fixture for session_getter above