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

@ -7,6 +7,7 @@ from io import BytesIO
from pathlib import Path
from unittest.mock import MagicMock
import anyio
import pytest
from asgi_lifespan import LifespanManager
from httpx import ASGITransport, AsyncClient
@ -76,7 +77,7 @@ async def files_client_fixture(
monkeypatch.undo()
# clear the temp db
with suppress(FileNotFoundError):
db_path.unlink()
await anyio.Path(db_path).unlink()
@pytest.fixture