File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed
Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 77import aiohttp
88import click_log
99import pytest
10+ import pytest_asyncio
1011from hypothesis import HealthCheck
1112from hypothesis import Verbosity
1213from hypothesis import settings
@@ -54,13 +55,13 @@ def benchmark():
5455 settings .load_profile ("dev" )
5556
5657
57- @pytest .fixture
58+ @pytest_asyncio .fixture
5859async def aio_session (event_loop ):
5960 async with aiohttp .ClientSession () as session :
6061 yield session
6162
6263
63- @pytest .fixture
64+ @pytest_asyncio .fixture
6465async def aio_connector (event_loop ):
6566 async with aiohttp .TCPConnector (limit_per_host = 16 ) as conn :
6667 yield conn
Original file line number Diff line number Diff line change 66
77import aiostream
88import pytest
9+ import pytest_asyncio
910
1011from vdirsyncer import exceptions
1112from vdirsyncer .storage .base import normalize_meta_value
@@ -50,7 +51,7 @@ def get_storage_args(self):
5051 """
5152 raise NotImplementedError ()
5253
53- @pytest .fixture
54+ @pytest_asyncio .fixture
5455 async def s (self , get_storage_args ):
5556 rv = self .storage_class (** await get_storage_args ())
5657 return rv
Original file line number Diff line number Diff line change 77
88import aiostream
99import pytest
10+ import pytest_asyncio
1011import requests
1112
1213
@@ -83,7 +84,7 @@ def xandikos_server():
8384 yield
8485
8586
86- @pytest .fixture
87+ @pytest_asyncio .fixture
8788async def slow_create_collection (request , aio_connector ):
8889 # We need to properly clean up because otherwise we might run into
8990 # storage limits.
Original file line number Diff line number Diff line change 11import hypothesis .strategies as st
22import pytest
3+ import pytest_asyncio
34from hypothesis import example
45from hypothesis import given
56
@@ -52,7 +53,7 @@ async def test_basic(monkeypatch):
5253 assert not await a .get_meta ("foo" ) and not await b .get_meta ("foo" )
5354
5455
55- @pytest .fixture
56+ @pytest_asyncio .fixture
5657@pytest .mark .asyncio
5758async def conflict_state (request , event_loop ):
5859 a = MemoryStorage ()
@@ -74,7 +75,7 @@ async def do_cleanup():
7475 return a , b , status
7576
7677
77- @pytest . mark . asyncio
78+ @pytest_asyncio . fixture
7879async def test_conflict (conflict_state ):
7980 a , b , status = conflict_state
8081
You can’t perform that action at this time.
0 commit comments