Skip to content

Refactoring binding python test#805

Open
heyolaniran wants to merge 1 commit intolightningdevkit:mainfrom
heyolaniran:refactoring_binding_python_test
Open

Refactoring binding python test#805
heyolaniran wants to merge 1 commit intolightningdevkit:mainfrom
heyolaniran:refactoring_binding_python_test

Conversation

@heyolaniran
Copy link

@heyolaniran heyolaniran commented Feb 24, 2026

Hello @tnull x @enigbe

In this Pull Request, I'd refactored the python binding test by introducing parallelism and by avoiding code duplication specially with event tracking and handling.

Thanks for having time to review the topic and send me a feedback if i need to make some specific action.

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Feb 24, 2026

🎉 This PR is now ready for review!
Please choose at least one reviewer by assigning them on the right bar.
If no reviewers are assigned within 10 minutes, I'll automatically assign one.
Once the first reviewer has submitted a review, a second will be assigned if required.

@heyolaniran heyolaniran marked this pull request as draft February 24, 2026 18:37
@heyolaniran heyolaniran marked this pull request as ready for review February 24, 2026 18:40
@heyolaniran heyolaniran marked this pull request as draft February 24, 2026 19:58
@heyolaniran heyolaniran marked this pull request as draft February 24, 2026 19:58
@heyolaniran heyolaniran marked this pull request as ready for review February 24, 2026 19:58
Copy link
Collaborator

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, honestly the only real change worth considering is the move to the event_handling method (though we'd want to rename it to something like expect_event).

I'm afraid everything else here looks like unnecessary code changes that don't really do anything substantially different and hence are not worth the churn.

@heyolaniran
Copy link
Author

I understand, thanks for the review. I'll be focused on the expect event function and try to make some improvments about some cases when a specific return is expected too.

@heyolaniran heyolaniran requested a review from tnull February 25, 2026 18:55
Copy link
Collaborator

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, but there are still a lot of changes in this PR that aren't connected to the expect_event method transition. Please revert them for now.

@heyolaniran
Copy link
Author

thanks for various suggestions, the history of change is more clear and all the refactoring updates are focused around the various expected event handler.

expect_event for generic events that not require specific return
expect_channel_pending_event for channel pending event with event return
expect_channel_ready_event for channel ready event with event return

@heyolaniran heyolaniran requested review from tnull February 26, 2026 16:37
@heyolaniran heyolaniran requested a review from tnull March 2, 2026 16:29
@Camillarhi
Copy link
Contributor

Camillarhi commented Mar 2, 2026

Thanks for the PR. Please squash the commits into one descriptive commit for a cleaner commit history

@heyolaniran heyolaniran force-pushed the refactoring_binding_python_test branch from 6dcb7f9 to 38a7cde Compare March 2, 2026 18:40
@heyolaniran heyolaniran marked this pull request as draft March 2, 2026 18:45
@heyolaniran heyolaniran force-pushed the refactoring_binding_python_test branch from 38a7cde to 508629f Compare March 2, 2026 18:54
@heyolaniran
Copy link
Author

Hello @Camillarhi, Thanks, I think it is good for the commit history now. Commits squashed

@heyolaniran heyolaniran marked this pull request as ready for review March 2, 2026 19:06
@Camillarhi
Copy link
Contributor

Hello @Camillarhi, Thanks, I think it is good for the commit history now. Commits squashed

Not really, it isn't. There are still two commits in the PR, with the first being unrelated, and the content of the second isn't clean as well. You can use this as guidance on writing commit messages https://cbea.ms/git-commit/

@heyolaniran heyolaniran force-pushed the refactoring_binding_python_test branch 2 times, most recently from b68ff82 to dfa4877 Compare March 2, 2026 20:20
@heyolaniran
Copy link
Author

@Camillarhi thanks for the resource ! you can check now please. Thanks.

@Camillarhi
Copy link
Contributor

@Camillarhi thanks for the resource ! you can check now please. Thanks.

Yes, it is better, few small grammar nits in the commit message - 'Added an expected_event function', 'This improves', and 'duplicating the code'"

@heyolaniran heyolaniran force-pushed the refactoring_binding_python_test branch from dfa4877 to 2257d14 Compare March 3, 2026 07:42
Added an expected_event function to better handle various events in the same block of code instead of duplicating the code for event listening. This improves the code readability and clarity.
@heyolaniran heyolaniran force-pushed the refactoring_binding_python_test branch from 2257d14 to 4477ca7 Compare March 3, 2026 07:44
@heyolaniran
Copy link
Author

@Camillarhi thanks for the resource ! you can check now please. Thanks.

Yes, it is better, few small grammar nits in the commit message - 'Added an expected_event function', 'This improves', and 'duplicating the code'"

Truly appreciate. :) it is fixed now but the VSS test is still failing, I have i little Idea about why. Is it interesting to fix it in this case ? cause I've seen a lot of merged PR with the VSS test failure.

@Camillarhi
Copy link
Contributor

@Camillarhi thanks for the resource ! you can check now please. Thanks.

Yes, it is better, few small grammar nits in the commit message - 'Added an expected_event function', 'This improves', and 'duplicating the code'"

Truly appreciate. :) it is fixed now but the VSS test is still failing, I have i little Idea about why. Is it interesting to fix it in this case ? cause I've seen a lot of merged PR with the VSS test failure.

I'd say separate PR for the VSS test, probably worth a deeper look before touching it.

@heyolaniran
Copy link
Author

I'd say separate PR for the VSS test, probably worth a deeper look before touching it.

Thanks for the feedback.

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.

4 participants