Skip to content

Commit 1b92926

Browse files
committed
refactor(consume): rename & simplify consume enginex command
1 parent ebc98a3 commit 1b92926

File tree

3 files changed

+10
-20
lines changed

3 files changed

+10
-20
lines changed

src/cli/pytest_commands/consume.py

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def get_static_test_paths(command_name: str, is_hive: bool) -> List[Path]:
4444
static_test_paths = [
4545
base_path / "simulators" / "simulator_logic" / f"test_via_{cmd}.py" for cmd in commands
4646
]
47-
elif command_name in ["engine", "engine-reorg", "engine_reorg"]:
47+
elif command_name in ["engine", "enginex"]:
4848
static_test_paths = [base_path / "simulators" / "simulator_logic" / "test_via_engine.py"]
4949
elif command_name == "rlp":
5050
static_test_paths = [base_path / "simulators" / "simulator_logic" / "test_via_rlp.py"]
@@ -101,26 +101,14 @@ def rlp() -> None:
101101

102102
@consume_command(is_hive=True)
103103
def engine() -> None:
104-
"""Client consumes via the Engine API."""
104+
"""Client consumes Engine Fixtures via the Engine API."""
105105
pass
106106

107107

108-
@consume.command(
109-
name="engine-reorg",
110-
help="Client consumes via the Engine API with reorg fixtures.",
111-
context_settings={"ignore_unknown_options": True},
112-
)
113-
@common_pytest_options
114-
def engine_reorg(
115-
pytest_args: List[str], help_flag: bool = False, pytest_help_flag: bool = False
116-
) -> None:
117-
"""Client consumes via the Engine API with reorg fixtures."""
118-
command_name = "engine_reorg" # Use underscore for internal logic
119-
static_test_paths = get_static_test_paths(command_name, is_hive=True)
120-
consume_cmd = create_consume_command(
121-
static_test_paths=static_test_paths, is_hive=True, command_name=command_name
122-
)
123-
consume_cmd.execute(list(pytest_args))
108+
@consume_command(is_hive=True)
109+
def enginex() -> None:
110+
"""Client consumes Engine X Fixtures via the Engine API."""
111+
pass
124112

125113

126114
@consume_command(is_hive=True)
@@ -133,7 +121,7 @@ def hive() -> None:
133121
context_settings={"ignore_unknown_options": True},
134122
)
135123
@common_pytest_options
136-
def cache(pytest_args: List[str], help_flag: bool = False, pytest_help_flag: bool = False) -> None:
124+
def cache(pytest_args: List[str], **kwargs) -> None:
137125
"""Consume command to cache test fixtures."""
138126
cache_cmd = create_consume_command(static_test_paths=[], is_hive=False)
139127
cache_cmd.execute(list(pytest_args))

src/cli/pytest_commands/processors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def process_args(self, args: List[str]) -> List[str]:
109109

110110
if self.command_name == "engine":
111111
modified_args.extend(["-p", "pytest_plugins.consume.simulators.engine.conftest"])
112-
elif self.command_name == "engine_reorg":
112+
elif self.command_name == "enginex":
113113
modified_args.extend(["-p", "pytest_plugins.consume.simulators.engine_reorg.conftest"])
114114
elif self.command_name == "rlp":
115115
modified_args.extend(["-p", "pytest_plugins.consume.simulators.rlp.conftest"])

whitelist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,8 @@ autoformat
10581058
Typechecking
10591059
groupstats
10601060
SharedPreStateGroup
1061+
zkEVMs
1062+
enginex
10611063
qube
10621064
aspell
10631065
codespell

0 commit comments

Comments
 (0)