Skip to content

Commit

Permalink
test gentx
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Feb 26, 2024
1 parent eb38ec1 commit 924f8ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion scripts/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ cd ../tests/integration_tests/hardhat
HUSKY_SKIP_INSTALL=1 npm install
npm run typechain
cd ..
pytest -vv -s
pytest -v -s test_account.py::test_get_transaction_count
15 changes: 7 additions & 8 deletions tests/integration_tests/test_account.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import time

import pytest
from web3 import Web3

Expand All @@ -11,33 +13,30 @@ def custom_ethermint(tmp_path_factory):
yield from setup_ethermint(path, 26700, long_timeout_commit=True)


@pytest.fixture(scope="module", params=["ethermint", "ethermint-ws", "geth"])
def cluster(request, custom_ethermint, geth):
@pytest.fixture(scope="module", params=["ethermint"])
def cluster(request, custom_ethermint):
"""
run on ethermint, ethermint websocket and geth
"""
provider = request.param
if provider == "ethermint":
yield custom_ethermint
elif provider == "ethermint-ws":
ethermint_ws = custom_ethermint.copy()
ethermint_ws.use_websocket()
yield ethermint_ws
elif provider == "geth":
yield geth
else:
raise NotImplementedError


def test_get_transaction_count(cluster):
time.sleep(8)
w3: Web3 = cluster.w3
blk = hex(w3.eth.block_number)
print("mm-blk", blk)
sender = ADDRS["validator"]

receiver = derive_new_account().address
n0 = w3.eth.get_transaction_count(receiver, blk)
# ensure transaction send in new block
w3_wait_for_new_blocks(w3, 1, sleep=0.1)
return
txhash = w3.eth.send_transaction(
{
"from": sender,
Expand Down

0 comments on commit 924f8ac

Please sign in to comment.