Skip to content

Commit 96d9c8d

Browse files
committed
refactor(consume): move test execution files to shared hive_tests directory
Consolidate test_via_engine.py and test_via_rlp.py into a shared hive_tests/ directory to improve organization and prepare for future multi-client architectures. - Create src/pytest_plugins/consume/simulators/hive_tests/ directory. - Move test_via_engine.py from engine/ to hive_tests/. - Move test_via_rlp.py from rlp/ to hive_tests/. - Update get_command_paths() to reference new locations. - Maintain separation: plugin configs (conftest.py) stay with their simulators. This provides better logical organization of test execution files while maintaining explicit pytest plugin structure.
1 parent 5d7455d commit 96d9c8d

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

src/cli/pytest_commands/consume.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,15 @@ def get_command_paths(command_name: str, is_hive: bool) -> List[Path]:
5454
base_path = Path("src/pytest_plugins/consume")
5555
if command_name == "hive":
5656
commands = ["rlp", "engine"]
57+
command_paths = [
58+
base_path / "simulators" / "hive_tests" / f"test_via_{cmd}.py" for cmd in commands
59+
]
60+
elif command_name in ["engine", "rlp"]:
61+
command_paths = [base_path / "simulators" / "hive_tests" / f"test_via_{command_name}.py"]
62+
elif command_name == "direct":
63+
command_paths = [base_path / "direct" / "test_via_direct.py"]
5764
else:
58-
commands = [command_name]
59-
60-
command_paths = [
61-
base_path / ("simulators" if is_hive else "") / cmd / f"test_via_{cmd}.py"
62-
for cmd in commands
63-
]
65+
raise ValueError(f"Unexpected command: {command_name}.")
6466
return command_paths
6567

6668

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Defines the Pytest test functions used by Hive Consume Simulators."""

src/pytest_plugins/simulators/helpers/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)