Skip to content
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
2 changes: 1 addition & 1 deletion packages/testing/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ classifiers = [
]
dependencies = [
"click>=8.1.0,<9",
"ethereum-hive>=0.1.0a1,<1.0.0",
"ethereum-hive>=0.1.0a5,<1.0.0",
"ethereum-execution",
"gitpython>=3.1.31,<4",
"PyJWT>=2.3.0,<3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,26 @@ def test_suite_description() -> str:
)


@pytest.fixture(scope="function", autouse=True)
def _per_test_reporting(
client: Client,
hive_test: HiveTest,
) -> None:
"""
Register a test for execution against a multi-test client.

Activate log segment capturing in the Hive backend for correct
client log reporting in the multi-test client case.

Parameter order matters: `client` listed before `hive_test`
ensures pytest sets up `client` first and tears it down last.
This guarantees `hive_test` teardown (`test.end()`) runs while
the hive node still exists, before `client` teardown calls
`mark_test_completed` / `client.stop()`.
"""
hive_test.register_multi_test_client(client)


@pytest.fixture(scope="function")
def client(
multi_test_hive_test: HiveTest,
Expand Down Expand Up @@ -179,6 +199,7 @@ def client(
multi_test_client_manager.register_client(
group_identifier, resolved_client
)
resolved_client.multi_test = True

try:
yield resolved_client
Expand Down
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading