Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove python_paths pytest option #2887

Merged
merged 3 commits into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions newsfragments/2887.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix failing tests from eth-tester, and deprecated ``python_paths`` config option
1 change: 0 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[pytest]
addopts= -v --showlocals --durations 10
python_paths= .
xfail_strict=true
asyncio_mode=strict

Expand Down
10 changes: 10 additions & 0 deletions tests/integration/test_ethereum_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,16 @@ def test_eth_getBlockByNumber_finalized(
) -> None:
super().test_eth_getBlockByNumber_finalized(w3, empty_block)

def test_eth_get_balance_with_block_identifier(self, w3: "Web3") -> None:
w3.testing.mine()
miner_address = w3.eth.get_block(1)["miner"]
genesis_balance = w3.eth.get_balance(miner_address, 0)
later_balance = w3.eth.get_balance(miner_address, 1)

assert is_integer(genesis_balance)
assert is_integer(later_balance)
assert later_balance > genesis_balance


class TestEthereumTesterNetModule(NetModuleTest):
pass
Expand Down