forked from pool/python-vdirsyncer
48 lines
1.4 KiB
Diff
48 lines
1.4 KiB
Diff
|
Index: vdirsyncer-0.19.3/tests/conftest.py
|
||
|
===================================================================
|
||
|
--- vdirsyncer-0.19.3.orig/tests/conftest.py
|
||
|
+++ vdirsyncer-0.19.3/tests/conftest.py
|
||
|
@@ -59,12 +59,12 @@ else:
|
||
|
|
||
|
|
||
|
@pytest_asyncio.fixture
|
||
|
-async def aio_session(event_loop):
|
||
|
+async def aio_session():
|
||
|
async with aiohttp.ClientSession() as session:
|
||
|
yield session
|
||
|
|
||
|
|
||
|
@pytest_asyncio.fixture
|
||
|
-async def aio_connector(event_loop):
|
||
|
+async def aio_connector():
|
||
|
async with aiohttp.TCPConnector(limit_per_host=16) as conn:
|
||
|
yield conn
|
||
|
Index: vdirsyncer-0.19.3/tests/unit/test_metasync.py
|
||
|
===================================================================
|
||
|
--- vdirsyncer-0.19.3.orig/tests/unit/test_metasync.py
|
||
|
+++ vdirsyncer-0.19.3/tests/unit/test_metasync.py
|
||
|
@@ -1,4 +1,5 @@
|
||
|
from __future__ import annotations
|
||
|
+import asyncio
|
||
|
|
||
|
import hypothesis.strategies as st
|
||
|
import pytest
|
||
|
@@ -57,7 +58,7 @@ async def test_basic(monkeypatch):
|
||
|
|
||
|
@pytest_asyncio.fixture
|
||
|
@pytest.mark.asyncio
|
||
|
-async def conflict_state(request, event_loop):
|
||
|
+async def conflict_state(request):
|
||
|
a = MemoryStorage()
|
||
|
b = MemoryStorage()
|
||
|
status = {}
|
||
|
@@ -70,7 +71,7 @@ async def conflict_state(request, event_
|
||
|
assert await b.get_meta("foo") == "baz"
|
||
|
assert not status
|
||
|
|
||
|
- event_loop.run_until_complete(do_cleanup())
|
||
|
+ asyncio.new_event_loop().run_until_complete(do_cleanup())
|
||
|
|
||
|
request.addfinalizer(cleanup)
|
||
|
|