-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Description
When running pdd bug on issue #486 (--quiet flag not suppressing output), the generated tests checked whether functions accept a quiet parameter (assert "quiet" in sig.parameters) instead of testing whether quiet mode actually suppresses output.
This allowed a fix to pass all tests by simply adding quiet=False parameters to function signatures — without implementing any suppression logic.
Steps to Reproduce
- Run
pdd bug https://github.com/promptdriven/pdd/issues/486 - Observe generated tests in
tests/test_quiet_mode.py
Expected Behavior
Generated tests should verify behavior, e.g.:
def test_preprocess_suppresses_panels_when_quiet(self):
with patch("pdd.preprocess.console") as mock_console:
preprocess("Hello world", quiet=True)
for c in mock_console.print.call_args_list:
assert "Starting prompt preprocessing" not in str(c)Actual Behavior
Generated tests only verify structure, e.g.:
def test_preprocess_suppresses_panels_when_quiet(self):
import inspect
sig = inspect.signature(preprocess)
assert "quiet" in sig.parameters # passes without real implementationImpact
- Round 1 fix passed all tests but
pdd --quiet generatestill emitted INFO logs, Rich panels, cloud fallback messages - Required manual test rewrite (Round 2) to get a working fix
- 5 of 7 generated tests were structural, not behavioral
Root Cause (hypothesis)
The test plan (Step 6) described correct behavioral tests, but test code generation (Step 7) simplified them to signature checks — possibly because generating mock-based behavioral tests requires more context about the function's internal output mechanisms.
Environment
- pdd-cli v0.0.144
- Original issue: --quiet flag does not suppress output #486
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels