Skip to content

Conversation

@jiaminc-cmu
Copy link
Collaborator

@jiaminc-cmu jiaminc-cmu commented Nov 6, 2025

closes #114

Feat: Enhance test file handling in pdd bug, pdd test, and pdd fix

Summary

This pull request introduces two key enhancements to improve the handling of test files in the PDD CLI:

  1. Numbered File Creation: The pdd bug and pdd test commands 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.

  2. Multiple Test File Support: The pdd fix and pdd test commands 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 fix and test commands 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:

  • Unit tests were added to tests/test_cli.py and tests/test_fix_main.py to verify that the fix and test commands correctly handle multiple test files.
  • The README.md has been updated to reflect the new functionality.
  • All existing tests were run to ensure that the changes did not introduce any regressions.

@gltanaka
Copy link
Contributor

pytest works locally
haven't run regression locally yet target 11/10

@jiaminc-cmu jiaminc-cmu marked this pull request as draft November 27, 2025 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support multi-file tests

2 participants