mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 06:46:32 +03:00
Turn start_rpc_server into a context manager
This commit is contained in:
@@ -10,9 +10,10 @@ from deltachat_rpc_client import Deltachat
|
||||
|
||||
@pytest_asyncio.fixture
|
||||
async def rpc(tmp_path):
|
||||
return await deltachat_rpc_client.start_rpc_server(
|
||||
async with deltachat_rpc_client.start_rpc_server(
|
||||
env={**os.environ, "DC_ACCOUNTS_PATH": str(tmp_path / "accounts")}
|
||||
)
|
||||
) as rpc:
|
||||
yield rpc
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in New Issue
Block a user