pimutils / pimutils/vdirsyncer
Refactor test suite, make code more testable
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 185
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 1
Description
I've reorganized the testsuite and put an explanation of the new structure into the docs as well. But I'm not done yet.
At some point I'd like to get decent coverage on the unittest suite (it's currently around 25%), but also the system + storage tests (currently around 70%) may need a bit of improvement.
This is not just a matter of writing tests. A few things in the testsuite are unfit for unittesting as their APIs are less "pure" than they could be.
One particular example that stuck out is vdirsyncer.repair, which wildly mixes UI with actual logic. Half of the code in there belongs into vdirsyncer.cli.
See this talk and this blogpost for inspiration.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the reorganized test-suite structure and its documentation, then inspect vdirsyncer.repair and the related vdirsyncer.cli responsibilities. Review unittest, system, and storage test coverage to identify gaps and APIs that hinder unit testing. Done would require improved coverage and clearer separation of UI from logic, but the issue does not define a bounded target.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100