Skip to content

Commit

Permalink
fix: test n lint
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Dec 19, 2024
1 parent 1918a15 commit 2fa14bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions tests/functional/test_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,10 @@ def test_model_validate_web3_block():

def test_transactions(block):
actual = block.transactions
expected = []
expected: list = []
assert actual == expected

# Ensure still works when hash is None (was a bug where this crashed).
block.hash = None
block.__dict__.pop("transactions", None) # Ensure not cached.
assert block.transactions == []

5 changes: 4 additions & 1 deletion tests/integration/cli/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ def test_run_interactive(scripts_runner, integ_project):
scripts = [integ_project.scripts_folder / f"{s}.py" for s in error_names]

# Show that the variable namespace from the script is available in the console.
user_input = "local_variable\nape.chain.provider.mine()\nape.chain.blocks.head\nexit\n"
user_input = (
"local_variable\nape.chain.provider.mine()\n"
"print(f'timestamp={ape.chain.blocks.head.timestamp}')\nexit\n"
)

result = scripts_runner.invoke("--interactive", scripts[0].stem, input=user_input)
assert result.exit_code == 0, result.output
Expand Down

0 comments on commit 2fa14bb

Please sign in to comment.