@@ -20,7 +20,7 @@ def __init__(self, command_paths: List[Path], is_hive: bool = False, command_nam
20
20
if is_hive :
21
21
processors .extend (
22
22
[
23
- HiveEnvironmentProcessor (command_name ),
23
+ HiveEnvironmentProcessor (command_name = command_name ),
24
24
ConsumeCommandProcessor (is_hive = True ),
25
25
]
26
26
)
@@ -49,13 +49,13 @@ 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 = [base_path / "simulators" / cmd / f"test_via_{ cmd } .py" for cmd in commands ]
58
- elif command_name in ["engine" , "engine-reorg" , "engine_reorg " ]:
58
+ elif command_name in ["engine" , "enginex " ]:
59
59
command_paths = [base_path / "simulators" / "hive_tests" / "test_via_engine.py" ]
60
60
elif command_name == "rlp" :
61
61
command_paths = [base_path / "simulators" / "hive_tests" / "test_via_rlp.py" ]
@@ -78,7 +78,7 @@ def consume_command(is_hive: bool = False) -> Callable[[Callable[..., Any]], cli
78
78
def decorator (func : Callable [..., Any ]) -> click .Command :
79
79
command_name = func .__name__
80
80
command_help = func .__doc__
81
- command_paths = get_command_paths (command_name )
81
+ command_paths = get_command_paths (command_name , is_hive )
82
82
83
83
@consume .command (
84
84
name = command_name ,
@@ -110,24 +110,14 @@ def rlp() -> None:
110
110
111
111
@consume_command (is_hive = True )
112
112
def engine () -> None :
113
- """Client consumes via the Engine API."""
113
+ """Client consumes Engine Fixtures via the Engine API."""
114
114
pass
115
115
116
116
117
- @consume .command (
118
- name = "engine-reorg" ,
119
- help = "Client consumes via the Engine API with reorg fixtures." ,
120
- context_settings = {"ignore_unknown_options" : True },
121
- )
122
- @common_pytest_options
123
- def engine_reorg (
124
- pytest_args : List [str ], help_flag : bool = False , pytest_help_flag : bool = False
125
- ) -> None :
126
- """Client consumes via the Engine API with reorg fixtures."""
127
- command_name = "engine_reorg" # Use underscore for internal logic
128
- command_paths = get_command_paths (command_name )
129
- consume_cmd = ConsumeCommand (command_paths , is_hive = True , command_name = command_name )
130
- consume_cmd .execute (list (pytest_args ))
117
+ @consume_command (is_hive = True )
118
+ def enginex () -> None :
119
+ """Client consumes Engine X Fixtures via the Engine API."""
120
+ pass
131
121
132
122
133
123
@consume_command (is_hive = True )
@@ -140,7 +130,7 @@ def hive() -> None:
140
130
context_settings = {"ignore_unknown_options" : True },
141
131
)
142
132
@common_pytest_options
143
- def cache (pytest_args : List [str ], help_flag : bool = False , pytest_help_flag : bool = False ) -> None :
133
+ def cache (pytest_args : List [str ], ** kwargs ) -> None :
144
134
"""Consume command to cache test fixtures."""
145
- cache_cmd = ConsumeCommand ([], is_hive = False , command_name = "cache" )
135
+ cache_cmd = ConsumeCommand ([], is_hive = False )
146
136
cache_cmd .execute (list (pytest_args ))
0 commit comments