Skip to content

Increase unit test coverage to 93% across all modules#168

Open
jimmysong wants to merge 3 commits intomainfrom
increase-psbt-coverage
Open

Increase unit test coverage to 93% across all modules#168
jimmysong wants to merge 3 commits intomainfrom
increase-psbt-coverage

Conversation

@jimmysong
Copy link
Collaborator

@jimmysong jimmysong commented Mar 1, 2026

Summary

  • Add comprehensive psbt.py unit tests (87% → 97% coverage)
  • Add unit tests for 15 additional modules: op, siphash, merkleblock, witness, helper, descriptor, bcur, script, psbt_helper, tx, bech32, ecc, hd, taproot, compactfilter, shamir
  • Fix linting issues (black formatting, flake8 unused imports) and scope pytest to buidl/test
  • Overall coverage increased from low-80s% to 93%, with most modules at 95%+

Test plan

  • All 628 tests pass, 6 skipped (network-dependent)
  • run_tests.sh passes (black + pytest + flake8)
  • Coverage verified via python3.11 -m coverage report

🤖 Generated with Claude Code

jimmysong and others added 3 commits March 1, 2026 09:36
97 new tests covering PSBTIn/PSBTOut validate, parse, combine, finalize,
and update paths, plus PSBT create, combine, and parse edge cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Black-format psbt.py and siphash.py (whitespace-only)
- Fix flake8 issues in test_psbt_coverage.py (unused imports, variable, blank lines)
- Scope pytest in run_tests.sh to buidl/test to avoid pexpect dependency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Three new test files covering op, siphash, merkleblock, witness,
helper, descriptor, bcur, script, psbt_helper, tx, bech32, ecc,
hd, taproot, compactfilter, and shamir modules. 282 new tests total.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jimmysong jimmysong changed the title Add comprehensive psbt.py unit tests (87% → 97% coverage) Increase unit test coverage to 93% across all modules Mar 3, 2026
@mflaxman
Copy link
Collaborator

mflaxman commented Mar 3, 2026

GitHub test running seems messed up in general (unrelated to this PR), but we need it to be passing for at least one configuration (slow on any OS is fine) in order to merge

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.

2 participants