Skip to content

Commit 0d1e05d

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 598c4b2 commit 0d1e05d

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
@@ -78,7 +78,13 @@ class HiveEnvironmentProcessor(ArgumentProcessor):
7878
"""Processes Hive environment variables for consume commands."""
7979

8080
def __init__(self, command_name: str):
81-
"""Initialize the processor with command name to determine plugin."""
81+
"""
82+
Initialize the processor with command name to determine plugin.
83+
84+
Args:
85+
command_name: The command name to determine which plugin to load.
86+
87+
"""
8288
self.command_name = command_name
8389

8490
def process_args(self, args: List[str]) -> List[str]:
@@ -99,6 +105,9 @@ def process_args(self, args: List[str]) -> List[str]:
99105
if os.getenv("HIVE_LOGLEVEL") is not None:
100106
warnings.warn("HIVE_LOG_LEVEL is not yet supported.", stacklevel=2)
101107

108+
modified_args.extend(["-p", "pytest_plugins.pytest_hive.pytest_hive"])
109+
110+
102111
if self.command_name == "engine":
103112
modified_args.extend(["-p", "pytest_plugins.consume.simulators.engine.conftest"])
104113
elif self.command_name == "rlp":

0 commit comments

Comments
 (0)