@@ -49,15 +49,15 @@ def create_executions(self, pytest_args: List[str]) -> List[PytestExecution]:
49
49
]
50
50
51
51
52
- def get_command_paths (command_name : str ) -> List [Path ]:
52
+ def get_command_paths (command_name : str , is_hive : bool ) -> List [Path ]:
53
53
"""Determine the command paths based on the command name and hive flag."""
54
54
base_path = Path ("src/pytest_plugins/consume" )
55
55
if command_name == "hive" :
56
56
commands = ["rlp" , "engine" ]
57
57
command_paths = [
58
58
base_path / "simulators" / "hive_tests" / f"test_via_{ cmd } .py" for cmd in commands
59
59
]
60
- elif command_name in ["engine" , "engine-reorg" , "engine_reorg " ]:
60
+ elif command_name in ["engine" , "enginex " ]:
61
61
command_paths = [base_path / "simulators" / "hive_tests" / "test_via_engine.py" ]
62
62
elif command_name == "rlp" :
63
63
command_paths = [base_path / "simulators" / "hive_tests" / "test_via_rlp.py" ]
@@ -80,7 +80,7 @@ def consume_command(is_hive: bool = False) -> Callable[[Callable[..., Any]], cli
80
80
def decorator (func : Callable [..., Any ]) -> click .Command :
81
81
command_name = func .__name__
82
82
command_help = func .__doc__
83
- command_paths = get_command_paths (command_name )
83
+ command_paths = get_command_paths (command_name , is_hive )
84
84
85
85
@consume .command (
86
86
name = command_name ,
@@ -112,24 +112,14 @@ def rlp() -> None:
112
112
113
113
@consume_command (is_hive = True )
114
114
def engine () -> None :
115
- """Client consumes via the Engine API."""
115
+ """Client consumes Engine Fixtures via the Engine API."""
116
116
pass
117
117
118
118
119
- @consume .command (
120
- name = "engine-reorg" ,
121
- help = "Client consumes via the Engine API with reorg fixtures." ,
122
- context_settings = {"ignore_unknown_options" : True },
123
- )
124
- @common_pytest_options
125
- def engine_reorg (
126
- pytest_args : List [str ], help_flag : bool = False , pytest_help_flag : bool = False
127
- ) -> None :
128
- """Client consumes via the Engine API with reorg fixtures."""
129
- command_name = "engine_reorg" # Use underscore for internal logic
130
- command_paths = get_command_paths (command_name )
131
- consume_cmd = ConsumeCommand (command_paths , is_hive = True , command_name = command_name )
132
- consume_cmd .execute (list (pytest_args ))
119
+ @consume_command (is_hive = True )
120
+ def enginex () -> None :
121
+ """Client consumes Engine X Fixtures via the Engine API."""
122
+ pass
133
123
134
124
135
125
@consume_command (is_hive = True )
@@ -142,7 +132,7 @@ def hive() -> None:
142
132
context_settings = {"ignore_unknown_options" : True },
143
133
)
144
134
@common_pytest_options
145
- def cache (pytest_args : List [str ], help_flag : bool = False , pytest_help_flag : bool = False ) -> None :
135
+ def cache (pytest_args : List [str ], ** kwargs ) -> None :
146
136
"""Consume command to cache test fixtures."""
147
- cache_cmd = ConsumeCommand ([], is_hive = False , command_name = "cache" )
137
+ cache_cmd = ConsumeCommand ([], is_hive = False )
148
138
cache_cmd .execute (list (pytest_args ))
0 commit comments