feat: test coverage for extension_support/plugins module#3166
feat: test coverage for extension_support/plugins module#3166Vaishnav88sk wants to merge 3 commits into
Conversation
Greptile SummaryThis PR adds 15 unit tests for Confidence Score: 4/5Safe to merge; issues are test quality problems, not production regressions. All findings are P2 test quality issues. The production code is unchanged. The one inline comment flags a set-based assertion that defeats its own purpose. test/unit/test_extension_plugins.py — review assertion correctness in TestMergeLists and TestGetTrampolineCliNames. Important Files Changed
Reviews (3): Last reviewed commit: "Merge branch 'master' into feat/add-exte..." | Re-trigger Greptile |
|
Great to add tests. Let's address the greptile and test comments and then I'll take a closer look. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3166 +/- ##
=========================================
Coverage ? 27.38%
=========================================
Files ? 375
Lines ? 51746
Branches ? 9143
=========================================
Hits ? 14170
Misses ? 36675
Partials ? 901 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adds test coverage for merge_lists, get_plugin_name, get_plugin, and get_trampoline_cli_names functions. Tests verify list merging behavior, plugin name extraction for various categories, error handling for invalid plugin paths, and trampoline CLI tracking.
8a75715 to
7366651
Compare
|
@romain-intel I've addressed the greptile bot's comments:
All 15 tests now pass with correct assertions. The branch has been force-pushed with the fixes. |
4bf16fb to
7366651
Compare
PR Type
Summary
Add unit test coverage for
extension_support/plugins.py(15 tests).Context / Motivation
The extension support plugin system is a critical part of Metaflow's architecture that allows third-party packages to extend Metaflow's functionality. Despite its importance, the plugin utility functions had zero test coverage.
Issue
Fixes #3163
Reproduction
Runtime:
Commands to run:
# paste exact commandsWhere evidence shows up:
Before (error / log snippet)
After (evidence that fix works)
Root Cause
Why This Fix Is Correct
Failure Modes Considered
Changes Made
Added 15 tests covering:
merge_lists: List merging with override behavior (5 tests)get_plugin_name: Name extraction for all plugin categories (6 tests)get_plugin: Plugin loading and error handling (2 tests)get_trampoline_cli_names: Trampoline CLI tracking (2 tests)Tests
Non-Goals
AI Tool Usage
for formatting