Skip to content

Commit

Permalink
py lints
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed Jan 24, 2025
1 parent 644e83a commit 9527906
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
12 changes: 6 additions & 6 deletions tests/integration_tests/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ def setup_custom_ethermint(
print(*cmd)
try:
subprocess.run(cmd, check=True)
except subprocess.CalledProcessError as e:
print("Error {}: {}".format(e.returncode, e.output))
raise e
except subprocess.CalledProcessError as err:
print("Error {}: {}".format(err.returncode, err.output))
raise err
if post_init is not None:
post_init(path, base_port, config)
proc = subprocess.Popen(
Expand All @@ -144,11 +144,11 @@ def setup_custom_ethermint(
if wait_port:
wait_for_port(ports.evmrpc_port(base_port))
wait_for_port(ports.evmrpc_ws_port(base_port))
e = Ethermint(
ethermint_instance = Ethermint(
path / "ethermint_9000-1", chain_binary=chain_binary or DEFAULT_CHAIN_BINARY
)
w3_wait_for_block(e.w3, 1)
yield e
w3_wait_for_block(ethermint_instance.w3, 1)
yield ethermint_instance
finally:
os.killpg(os.getpgid(proc.pid), signal.SIGTERM)
proc.wait()
4 changes: 2 additions & 2 deletions tests/integration_tests/test_grpc_only.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ def expect_cb(rsp):
addr = custom_ethermint.cosmos_cli(0).consensus_address()
cons_addr = decode_bech32(addr)

def expect_cb(rsp):
def expect_cb2(rsp):
ret = base64.b64decode(rsp["ret"].encode())
return "code" not in rsp and 100 == int.from_bytes(ret, "big")

# should work with both chain_id and proposer_address set
grpc_eth_call(
api_port,
msg,
expect_cb,
expect_cb2,
chain_id=100,
proposer_address=base64.b64encode(cons_addr).decode(),
)
Expand Down
6 changes: 5 additions & 1 deletion tests/integration_tests/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,8 @@
# home=cli.data_dir,
# )
# )
# assert p == {"allowed_clients": ["06-solomachine", "07-tendermint", "09-localhost"]}
# assert p == {"allowed_clients":[
# "06-solomachine",
# "07-tendermint",
# "09-localhost"
# ]}

0 comments on commit 9527906

Please sign in to comment.