Skip to content

Commit 8d51484

Browse files
committed
remove web3(request) fixture
removes web3(request) fixture from test_contract_buildTransaction.py
1 parent 7c9739b commit 8d51484

4 files changed

+1
-53
lines changed

tests/core/contracts/test_contract_buildTransaction.py

-27
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,13 @@
44
dissoc,
55
)
66

7-
from web3 import Web3
87
from web3.exceptions import (
98
ValidationError,
109
)
11-
from web3.middleware import (
12-
local_filter_middleware,
13-
)
14-
from web3.providers.eth_tester import (
15-
EthereumTesterProvider,
16-
)
1710

1811
# -*- coding: utf-8 -*-
1912

2013

21-
# Ignore warning in pyethereum 1.6 - will go away with the upgrade
22-
pytestmark = pytest.mark.filterwarnings("ignore:implicit cast from 'char *'")
23-
24-
25-
# Ignore warning in pyethereum 1.6 - will go away with the upgrade
26-
pytestmark = pytest.mark.filterwarnings("ignore:implicit cast from 'char *'")
27-
28-
29-
@pytest.fixture(
30-
params=[True, False],
31-
ids=["local_filter_middleware", "node_based_filter"])
32-
def web3(request):
33-
use_filter_middleware = request.param
34-
provider = EthereumTesterProvider()
35-
w3 = Web3(provider)
36-
if use_filter_middleware:
37-
w3.middleware_onion.add(local_filter_middleware)
38-
return w3
39-
40-
4114
@pytest.fixture()
4215
def math_contract(web3, MathContract, address_conversion_func):
4316
deploy_txn = MathContract.constructor().transact()

tests/core/filtering/conftest.py

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def tester_snapshot(web3):
2727

2828

2929
@pytest.fixture(
30+
scope='function',
3031
params=[True, False],
3132
ids=["local_filter_middleware", "node_based_filter"])
3233
def web3(request):

tests/core/filtering/test_contract_data_filters.py

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
EthereumTesterProvider,
2020
)
2121

22-
# Ignore warning in pyethereum 1.6 - will go away with the upgrade
23-
pytestmark = pytest.mark.filterwarnings("ignore:implicit cast from 'char *'")
24-
2522

2623
@pytest.fixture(
2724
scope="module",

tests/core/filtering/test_contract_on_event_filtering.py

-23
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,6 @@
44
is_address,
55
)
66

7-
from web3 import Web3
8-
from web3.middleware import (
9-
local_filter_middleware,
10-
)
11-
from web3.providers.eth_tester import (
12-
EthereumTesterProvider,
13-
)
14-
15-
# Ignore warning in pyethereum 1.6 - will go away with the upgrade
16-
pytestmark = pytest.mark.filterwarnings("ignore:implicit cast from 'char *'")
17-
18-
19-
@pytest.fixture(
20-
params=[True, False],
21-
ids=["local_filter_middleware", "node_based_filter"])
22-
def web3(request):
23-
use_filter_middleware = request.param
24-
provider = EthereumTesterProvider()
25-
w3 = Web3(provider)
26-
if use_filter_middleware:
27-
w3.middleware_onion.add(local_filter_middleware)
28-
return w3
29-
307

318
@pytest.mark.parametrize('call_as_instance', (True, False))
329
def test_create_filter_address_parameter(web3, emitter, Emitter, call_as_instance):

0 commit comments

Comments
 (0)