Add expensetracker sample project with test coverage analysis - #9
Draft
hatcheric950 wants to merge 2 commits into
Draft
Add expensetracker sample project with test coverage analysis#9hatcheric950 wants to merge 2 commits into
hatcheric950 wants to merge 2 commits into
Conversation
Creates a small Python expense-tracking library (Account, Transaction, Budget, utils) with intentional coverage gaps to demonstrate where tests should be improved. Existing tests cover only happy paths in account.py (69%) and transaction.py (73%), leaving budget.py (19%) and utils.py (26%) nearly untested. COVERAGE_ANALYSIS.md documents the gaps and provides concrete test cases for each area. https://claude.ai/code/session_01HwTh9hP2E3nye7NBvz6p86
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
$(cat <<'EOF'
Summary
Account,Transaction,Budget,utils) withpytest+pytest-covconfiguredCOVERAGE_ANALYSIS.mdwith a full breakdown of gaps and concrete proposed test casesCoverage baseline (branch coverage enabled)
account.pybudget.pytransaction.pyutils.pyProposed improvements (priority order)
budget.py— zero tests; core financial logic (overspend detection, category limits)account.pyerror paths — overdraft guard, invalid deposit/withdraw, history trackingutils.py— shared helpers untested; bugs here surface everywheretransaction.pyvalidation — input guards andto_dict()serialisationFull test cases for each area are in COVERAGE_ANALYSIS.md.
Test plan
pip install -e ".[dev]"succeedspython -m pytest tests/ --cov=src/expensetracker --cov-report=term-missing -v— all 10 tests pass, coverage numbers match table aboveCOVERAGE_ANALYSIS.mdraises overall coverage above 90%https://claude.ai/code/session_01HwTh9hP2E3nye7NBvz6p86
EOF
)
Generated by Claude Code