Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/ethpm/test_deployments.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def test_get_linked_deployments(escrow_package):
assert actual_linked_deployments == {"Escrow": all_deployments["Escrow"]}
# integration via package.deployments
deployments = escrow_package.deployments
assert len(deployments.contract_instances) is 2
assert len(deployments.contract_instances) == 2


@pytest.mark.parametrize(
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_ethereum_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def test_eth_estimateGas_with_block(self,
def test_eth_chainId(self, web3):
chain_id = web3.eth.chainId
assert is_integer(chain_id)
assert chain_id is 61
assert chain_id == 61


class TestEthereumTesterVersionModule(VersionModuleTest):
Expand Down
16 changes: 8 additions & 8 deletions web3/_utils/module_testing/shh_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,23 +378,23 @@ def test_shh_version(self, web3):

def test_shh_info(self, web3):
pre_info = web3.geth.shh.info()
assert pre_info["maxMessageSize"] is not 1024
assert pre_info["minPow"] is not 0.5
assert pre_info["maxMessageSize"] != 2048
assert pre_info["minPow"] != 0.6

web3.geth.shh.set_max_message_size(1024)
web3.geth.shh.set_min_pow(0.5)
web3.geth.shh.set_max_message_size(2048)
web3.geth.shh.set_min_pow(0.6)

info = web3.geth.shh.info()

assert len(info) == 4
assert info["maxMessageSize"] == 1024
assert info["minPow"] == 0.5
assert info["maxMessageSize"] == 2048
assert info["minPow"] == 0.6

def test_shh_info_deprecated(self, web3):
with pytest.warns(DeprecationWarning):
pre_info = web3.geth.shh.info()
assert pre_info["maxMessageSize"] is not 1024
assert pre_info["minPow"] is not 0.5
assert pre_info["maxMessageSize"] != 1024
assert pre_info["minPow"] != 0.5

web3.geth.shh.setMaxMessageSize(1024)
web3.geth.shh.setMinPoW(0.5)
Expand Down
2 changes: 1 addition & 1 deletion web3/_utils/normalizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def abi_ens_resolver(w3, type_str, val):
"Could not look up name %r because ENS is"
" set to None" % (val)
)
elif int(w3.net.version) is not 1 and not isinstance(w3.ens, StaticENS):
elif int(w3.net.version) != 1 and not isinstance(w3.ens, StaticENS):
raise InvalidAddress(
"Could not look up name %r because web3 is"
" not connected to mainnet" % (val)
Expand Down
2 changes: 1 addition & 1 deletion web3/middleware/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def iter_latest_block(w3, to_block=None):

is_bounded_range = (
to_block is not None and
to_block is not 'latest'
to_block != 'latest'
)

while True:
Expand Down