Skip to content

Commit a7189f7

Browse files
committed
Mark async fixture as such, clean up pytest DeprecationWarnings
1 parent 6973d6d commit a7189f7

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

tests/integration/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def revert_contract_factory(web3):
3737
return contract_factory
3838

3939

40-
@pytest.yield_fixture(scope="module")
40+
@pytest.fixture(scope="module")
4141
def event_loop(request):
4242
loop = asyncio.get_event_loop_policy().new_event_loop()
4343
yield loop

tests/integration/go_ethereum/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def unlockable_account_dual_type(unlockable_account, address_conversion_func):
181181
return address_conversion_func(unlockable_account)
182182

183183

184-
@pytest.yield_fixture
184+
@pytest.fixture
185185
def unlocked_account_dual_type(web3, unlockable_account_dual_type, unlockable_account_pw):
186186
web3.geth.personal.unlock_account(unlockable_account_dual_type, unlockable_account_pw)
187187
yield unlockable_account_dual_type

tests/integration/go_ethereum/test_goethereum_http.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
import pytest_asyncio
23

34
from tests.utils import (
45
get_open_port,
@@ -94,7 +95,7 @@ def web3(geth_process, endpoint_uri):
9495
return _web3
9596

9697

97-
@pytest.fixture(scope="module")
98+
@pytest_asyncio.fixture(scope="module")
9899
async def async_w3(geth_process, endpoint_uri):
99100
await wait_for_aiohttp(endpoint_uri)
100101
_web3 = Web3(

0 commit comments

Comments
 (0)