Resolves #114: Enhance test file handling in pdd bug, pdd test, and pdd fix
#120
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.
closes #114
Feat: Enhance test file handling in
pdd bug,pdd test, andpdd fixSummary
This pull request introduces two key enhancements to improve the handling of test files in the PDD CLI:
Numbered File Creation: The
pdd bugandpdd testcommands now automatically create new test files with a numbered suffix (e.g.,test_code_1.py,test_code_2.py) if a file with the same name already exists. This prevents accidental overwrites and preserves existing test files.Multiple Test File Support: The
pdd fixandpdd testcommands have been updated to accept multiple unit test files. This allows users to provide a comprehensive set of tests when fixing bugs or generating additional tests.Motivation
The motivation for these changes is to provide a more flexible and robust testing workflow. The numbered file creation prevents data loss and allows for the generation of multiple test variations. The ability to use multiple test files in the
fixandtestcommands enables more thorough and accurate bug fixing and test generation, especially in complex scenarios where tests are split across multiple files.Testing
The following steps were taken to test the changes:
tests/test_cli.pyandtests/test_fix_main.pyto verify that thefixandtestcommands correctly handle multiple test files.README.mdhas been updated to reflect the new functionality.