Offering help with Unit Tests
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 155
Description
### Feature Idea
Hi everyone! I noticed a lot of Pull Requests, particularly in relation to new features and tests.
I'd like to help improve the test coverage using [CodeBeaver](https://www.codebeaver.ai/), an AI agent that I built (it's free for open source!). To demonstrate what's possible, I've created a PR:
[MultiGPU Work Units For Accelerated Sampling - Unit Tests](https://github.com/CodeBeaverAI/ComfyUI/pull/2)
that adds comprehensive tests to the last Pull Request that was opened here: [MultiGPU Work Units For Accelerated Sampling](https://github.com/comfyanonymous/ComfyUI/pull/7063).
## What the PR demonstrates:
* Increases coverage by +100.00% for `tests/test_comfyui_version.py`
* Adds comprehensive tests for `tests/test_comfyui_version.py` and `tests/test_cli_args.py`
* CodeBeaver found a bug in the implementation of the WrapperExecutor's `__call__` method and the `merge_nested_dicts` function, which affects the expected behavior of the tests. Not a big deal but the kind of thing that may surface down the line.
On top of that: If you check the PR you will see that CodeBeaver does not only go for coverage - it also adds all the edge cases it can think of (we make it iterate 3 times on that alone).
## How it works:
CodeBeaver analyzes your code changes in PRs
* Automatically generates and updates tests
* Opens PRs with new/updated tests
* Helps catch bugs before they reach production
## Next steps
If this interests the maintainer team, I'm happy to:
* Walk through how the tests were generated
* Help set up automated test generation for future PRs (takes ~5 minutes)
* Focus on specific areas you'd like to improve coverage for
Let me know what you think! Happy to adapt this approach based on the project's needs.
### Existing Solutions
_No response_
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.