From 2fa14bb7a9c1a434ff5353b6885f70a5e06af74a Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Thu, 19 Dec 2024 09:44:36 -0600 Subject: [PATCH] fix: test n lint --- tests/functional/test_block.py | 3 +-- tests/integration/cli/test_run.py | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/functional/test_block.py b/tests/functional/test_block.py index 1fbbc55b9a..d5912ab0a9 100644 --- a/tests/functional/test_block.py +++ b/tests/functional/test_block.py @@ -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 == [] - diff --git a/tests/integration/cli/test_run.py b/tests/integration/cli/test_run.py index 937bb1ba2e..fd1058c4a8 100644 --- a/tests/integration/cli/test_run.py +++ b/tests/integration/cli/test_run.py @@ -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