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:
parent
6f5b984a22
commit
e545d12c40
9 changed files with 36 additions and 30 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue