Implemented PassSuppressFormatter, a custom Behave formatter that buffers
per-scenario output and only flushes it to stdout when the scenario failed
or errored. Passing scenarios produce no output, keeping an all-passing
suite at ~5-10 lines (the _print_overall_summary block only).
Key design decisions:
- PassSuppressFormatter (in scripts/behave_pass_suppress_formatter.py)
inherits from behave's Formatter base class so it can be registered via
behave.formatter._registry.register_as(), which enforces issubclass(cls,
Formatter).
- _SUPPRESS_STATUSES = {'passed', 'skipped'} determines which terminal
statuses are silently discarded; all others (failed, undefined, etc.)
trigger a buffer flush so no failure is hidden.
- _make_runner() in run_behave_parallel.py registers the formatter and
sets it as the default format whenever config.format is None (no
explicit -f/--format flag). Coverage mode (BEHAVE_PARALLEL_COVERAGE=1)
bypasses the formatter and falls back to config.default_format so
slipcover can instrument a single process.
- The formatter lives in a separate file to keep both scripts under the
500-line limit. _install_behave_parallel() in noxfile.py copies both
files into the behave_parallel package. A try/except import handles
both the direct-script path (tests via importlib) and the installed-
package path (nox CI).
- Three new BDD scenarios in behave_parallel_log_filtering.feature cover:
(1) passing scenario -> no output, (2) failing scenario -> full output,
(3) mixed run -> only failing scenario visible. All 20 scenarios pass.
ISSUES CLOSED: #10987