From 86eda6edfca18e3409760bce155dfd0dd5eb5a49 Mon Sep 17 00:00:00 2001 From: CleverThis Date: Sat, 30 May 2026 15:54:07 -0400 Subject: [PATCH] fix(tests): remove duplicate "rejection output should contain" step to fix AmbiguousStep The new step file defined a Then step that collided with the pre-existing definition in validation_attach_type_guard_steps.py:220, causing behave to abort step-module loading with AmbiguousStep across every worker and failing the unit_tests gate with 32 errored features. Remove the duplicate from the new file and bridge context.last_result = context.named_opts_result after each invoke so the pre-existing, context.last_result-based step covers the new feature file's scenarios. Closes #3684 --- .../steps/tdd_validation_attach_named_options_steps.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/features/steps/tdd_validation_attach_named_options_steps.py b/features/steps/tdd_validation_attach_named_options_steps.py index 8b0562640..0a56c112f 100644 --- a/features/steps/tdd_validation_attach_named_options_steps.py +++ b/features/steps/tdd_validation_attach_named_options_steps.py @@ -80,6 +80,7 @@ def step_named_opts_invoke_with_args( validation_app, cmd, ) + context.last_result = context.named_opts_result @when('I invoke validation attach "{resource}" "{validation}" with no extra args') @@ -92,6 +93,7 @@ def step_named_opts_invoke_no_args( validation_app, cmd, ) + context.last_result = context.named_opts_result # --------------------------------------------------------------------------- @@ -163,10 +165,3 @@ def step_named_opts_attach_rejected(context: Context) -> None: f"Expected non-zero exit code (rejection), got {result.exit_code}. " f"Output: {result.output}" ) - - -@then('the rejection output should contain "{text}"') -def step_named_opts_rejection_contains(context: Context, text: str) -> None: - """Verify the rejection output contains the expected text.""" - output = context.named_opts_result.output - assert text in output, f"Expected {text!r} in rejection output, got: {output!r}"