-
Notifications
You must be signed in to change notification settings - Fork 4
Feat/test suite infrastructure #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Added and to - Created with standard fee fixtures - Created with unit tests for fee band logic covers: - Stuck vs Non-stuck discount application - New channel safeguard - Premium application - Added GitHub Actions workflow
Summary of ChangesHello @TrezorHannes, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the project's quality assurance by establishing a robust testing framework. It introduces unit tests for key components, specifically Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a comprehensive testing infrastructure using pytest and pytest-mock, which is a significant step towards improving code quality and reliability. The addition of unit tests for fee_adjuster.py and Magma/magma_sale_process.py, along with CI configuration, is highly commendable. The documentation update for fee_adjuster.md is also a good addition, providing clear instructions for running the new test suite. The tests cover important logic and edge cases, demonstrating a thorough approach to verification.
- tests/Magma: switch to pytest style, use fixtures for mocking, stricter args checks - infra: add pyproject.toml, remove sys.path hacks - docs: update fee_adjuster.md
PR: Add Testing Suite Infrastructure
Summary of Changes
pytestandpytest-mock.fee_adjuster.py(focusing on the recent "stuck channel" fix).Magma/magma_sale_process.py(focusing on order handling and LND integration).fee_adjuster.md) with testing instructions.Detailed Changes
requirements-dev.txt: Addedpytest,pytest-mock,requests-mock.tests/conftest.py: Added shared fixtures for fee configuration..github/workflows/tests.yml: New CI workflow.tests/test_fee_adjuster.py.accept_order,reject_order,execute_lnd_command, andexecute_lncli_addinvoiceviatests/Magma/test_magma_sale_process.py.sys.modulespatching to mock global side-effects (telebot, configparser).Testing Strategy
What's Left for Later
LNDg/scripts (e.g.,amboss_pull.py,channel_base-fee.py).Checklist