Skip to content

Commit 9f91081

Browse files
committed
fix(consume): add explicit plugin registration for simulator-specific configs
With the move to hive_tests/, the simulator-specific conftest.py files are no longer automatically discovered. Add explicit plugin registration to ensure _supported_fixture_formats and other simulator configs are properly loaded. - Add command_name parameter to HiveEnvironmentProcessor. - Register simulator-specific plugins based on command name. - Update ConsumeCommand to pass command_name to processors. - Fix AttributeError: 'Config' object has no attribute '_supported_fixture_formats'.
1 parent 5c6b927 commit 9f91081

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/cli/pytest_commands/processors.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,13 @@ class HiveEnvironmentProcessor(ArgumentProcessor):
7575
"""Processes Hive environment variables for consume commands."""
7676

7777
def __init__(self, command_name: str):
78-
"""Initialize the processor with command name to determine plugin."""
78+
"""
79+
Initialize the processor with command name to determine plugin.
80+
81+
Args:
82+
command_name: The command name to determine which plugin to load.
83+
84+
"""
7985
self.command_name = command_name
8086

8187
def process_args(self, args: List[str]) -> List[str]:
@@ -96,6 +102,9 @@ def process_args(self, args: List[str]) -> List[str]:
96102
if os.getenv("HIVE_LOGLEVEL") is not None:
97103
warnings.warn("HIVE_LOG_LEVEL is not yet supported.", stacklevel=2)
98104

105+
modified_args.extend(["-p", "pytest_plugins.pytest_hive.pytest_hive"])
106+
107+
99108
if self.command_name == "engine":
100109
modified_args.extend(["-p", "pytest_plugins.consume.simulators.engine.conftest"])
101110
elif self.command_name == "rlp":

0 commit comments

Comments
 (0)