#36402 refactor: `wallet_importdescriptors` to separate `run_test()` contents into specific functions
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #36402 refactor: `wallet_importdescriptors` to separate `run_test()` contents into specific functions | Ready | 0 | Positive | 0 + 543 tests | |||
|
|
|
|
| |||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||
Goal
Refactors functional test `wallet_importdescriptors.py` by splitting its monolithic `run_test()` method into modular helper functions. The changes consist of test code movement and reorganization without modifying test coverage or expected behavior.
Problem: The `run_test()` method in `wallet_importdescriptors.py` was over 800 lines long, making test logic difficult to follow, debug, and extend when adding new descriptor import test cases.
Evidence of importance:
- Author observed during review of another PR that run_test() was 'more than 800 lines of code long, and looked messy and confusing, specially for someone not familiar with that test suite' (PR description)
Scope: Mechanical code movement in a single functional test file.
Risk of a mistake: low (tests). A mistake would cause test flakiness or false failures in the descriptor import functional test.
Changed since the previous assessment: The commit was updated/rebased; the scope and approach remain identical.
Reviewability
Ready
Nothing known that would invalidate a review now.
Waiting on (from the thread read):
- reviewer: review of the rebased PR 2026-10-09
Agreement
Positive
support without stated reasons, no open objection (w0xlt, polespinasa)
Thread notes: Nebula-21 announced a rebase on master; no new review claims or support were added.
Objections, suggestions, and questions:
| Reviewer | Type | Harm, request, or question | Status | Must be | Author replied | Quote |
|---|---|---|---|---|---|---|
| polespinasa (member) | suggestion, style | Remove unnecessary added and removed newlines that add noise to the color-moved diff filter | answered · author explained newlines were avoided as much as possible but are needed to preserve original test separations | answered | yes | 2026-10-05: 'There are some unnecessary new lines added and removed that add noise to the color-dimmed filter :)' Status from: 2026-10-08: nebula-21: 'I've tried to avoid them as much as possible, but some of them are necessary to re-arrange into new functions keeping th' |
Support:
- w0xlt (contributor) (Approach ACK, 2026-10-01): (no reason given) [not substantive]
- polespinasa (member) (Concept ACK, 2026-10-05): (no reason given) [not substantive]
Participants:
- w0xlt (contributor, support, 1 statements 2026-10-01 to 2026-10-01): gave an Approach ACK
- polespinasa (member, support, 1 statements 2026-10-05 to 2026-10-05): gave a Concept ACK and noted unnecessary newlines adding diff noise
Files
1037 lines under test/bench/ci.
- test/functional/wallet_importdescriptors.py +543/-494
Card
The short text the ranking pass compares across PRs.
Refactors functional test wallet_importdescriptors.py by splitting its 800-line run_test method into modular sub-functions. The PR targets developer friction caused by a monolithic test structure, aiming to make descriptor import tests easier to understand and extend. The only evidence presented is author observation regarding test readability. This change is internal test code movement with no dependencies or behavior changes.
Data
thread read through 2026-10-09 (4 statements), head e46592815f
labels: Refactoring
Categories
Wallet
P4 · cleanup
Refactors wallet descriptor functional tests into helper functions without changing behavior or coverage. The author noted the monolithic test method was over 800 lines and 'looked messy and confusing' (PR description).
Membership: Modifies test/functional/wallet_importdescriptors.py, which exercises wallet descriptor import RPCs and is maintained by wallet reviewers.
Factors: security/stability 0, bug 0, performance 0, user value 0, leverage 0