-
Couldn't load subscription status.
- Fork 1.9k
Refactor test_plugin.py: Streamline plugin tests and migrate to pytest
#6022
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
base: master
Are you sure you want to change the base?
Conversation
Also simplified test wherever possible.
Reviewer's GuideThis PR refactors the plugin test suite by migrating from unittest to pytest (introducing PluginTestCasePytest and deprecating the old TestCase), augments the PluginMixin helper with dynamic registration/unregistration and context managers for better isolation, and modernizes individual tests through fixtures, parametrization, and reduced boilerplate. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6022 +/- ##
==========================================
- Coverage 66.52% 66.48% -0.04%
==========================================
Files 117 117
Lines 18084 18084
Branches 3061 3061
==========================================
- Hits 12030 12023 -7
- Misses 5403 5409 +6
- Partials 651 652 +1 🚀 New features to boost your workflow:
|
This PR addresses historical testing debt in
test_plugins.pyby standardizing plugin test infrastructure.PluginTestCasePytest, deprecating the olderPluginTestCase(unittest-based) to unify tests under pytest.PluginMixinwith programmatic plugin registration/unregistration while still working through standardload_plugins, improving test isolation and avoiding fragile disk/module hacks.There is still the
PromptChoicesTestleft which I have not touched (this one scares me 👻).Coverage: