Conversation
- Added test_missing_annotation_raises to verify MissingAnnotation is raised for required arguments. - Added test_missing_optional_annotation_does_not_raise to verify optional arguments are handled correctly. - Achieved 100% coverage for plugins/python/python/phlex/__init__.py. - Verified formatting with ruff. Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Pull request overview
Adds unit test coverage for phlex.MissingAnnotation behavior as exercised through phlex.Variant, ensuring required-but-unannotated parameters raise and optional parameters with defaults do not.
Changes:
- Import
MissingAnnotationinto the Variant unit test module. - Add tests verifying
Variant(...)raisesMissingAnnotationwhen a required parameter annotation is missing. - Add tests verifying missing annotations for defaulted (optional) parameters do not raise.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #328 +/- ##
==========================================
+ Coverage 80.20% 80.39% +0.19%
==========================================
Files 127 127
Lines 3102 3102
Branches 547 547
==========================================
+ Hits 2488 2494 +6
+ Misses 386 381 -5
+ Partials 228 227 -1
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This PR improves the testing of
plugins/python/python/phlex/__init__.pyby adding unit tests for theMissingAnnotationexception. It covers the case where a required argument is missing from the annotations and verifies that optional arguments with default values do not trigger the exception. These changes bring the coverage ofphlex/__init__.pyto 100%.PR created automatically by Jules for task 8666460460076968556 started by @greenc-FNAL