Add failing test for #232 #252
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds a failing test that detects the bug reported in #232.
Test File
tests/test_issue_232_reproduction.pyWhat This PR Contains
Tests Included
test_issue_232_only_test_file_modified_should_not_print_code_file- FAILS (detects the bug)test_issue_232_only_code_file_modified_should_not_print_test_file- FAILS (detects symmetrical bug)test_both_files_modified_should_print_both_paths- PASSES (positive case)Root Cause
The bug is in
pdd/fix_main.pyat lines 418-423. Whenpdd fixcompletes successfully, the output messaging unconditionally prints both "Test file:" and "Code file:" paths, even when only one file was modified.The file-saving logic (lines 387-397) correctly uses
if fixed_unit_test:andif fixed_code:before writing files, but the output messaging doesn't follow the same pattern.Next Steps
pdd/fix_main.py:418-423)Fixes #232
Generated by PDD agentic bug workflow