Skip to content

Conversation

@f321x
Copy link
Member

@f321x f321x commented Dec 12, 2025

It would be nice to have some way to test the (utility) methods of LNWallet/LNWorker to allow for more coverage and detect regressions like #10350 before they reach the GUI etc.

As it feels wrong to put these tests in test_lnpeer (where we already have a MockLNWallet), I created a new test file test_lnwallet.py, using the MockLNWallet, specifically for testing this functionality.

It currently fails because it triggers #10350

Adds new unittest file test_lnwallet.py using the MockLNWallet from
test_lnpeer to allow unittesting utility functions of LNWallet/LNWorker.
@ecdsa
Copy link
Member

ecdsa commented Dec 13, 2025

I would very much prefer if we stopped mocking up LNWallet.
For example, we could separate LNWallet from LNWorker.
LNWorker should manage peer-to-peer communications, and be mocked up in unit tests. LNWallet would not be mocked up.

Of course what I am saying is not conflicting with this pull request.
But this PR builds more stuff upon MockLNWallet...

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