Skip to content

Commit

Permalink
Mark async fixture as such, clean up pytest DeprecationWarnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kclowes committed Feb 11, 2022
1 parent 6973d6d commit a7189f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def revert_contract_factory(web3):
return contract_factory


@pytest.yield_fixture(scope="module")
@pytest.fixture(scope="module")
def event_loop(request):
loop = asyncio.get_event_loop_policy().new_event_loop()
yield loop
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/go_ethereum/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def unlockable_account_dual_type(unlockable_account, address_conversion_func):
return address_conversion_func(unlockable_account)


@pytest.yield_fixture
@pytest.fixture
def unlocked_account_dual_type(web3, unlockable_account_dual_type, unlockable_account_pw):
web3.geth.personal.unlock_account(unlockable_account_dual_type, unlockable_account_pw)
yield unlockable_account_dual_type
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/go_ethereum/test_goethereum_http.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest
import pytest_asyncio

from tests.utils import (
get_open_port,
Expand Down Expand Up @@ -94,7 +95,7 @@ def web3(geth_process, endpoint_uri):
return _web3


@pytest.fixture(scope="module")
@pytest_asyncio.fixture(scope="module")
async def async_w3(geth_process, endpoint_uri):
await wait_for_aiohttp(endpoint_uri)
_web3 = Web3(
Expand Down

0 comments on commit a7189f7

Please sign in to comment.