-
Notifications
You must be signed in to change notification settings - Fork 0
2022 11 28 defaults #4
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: base-sha/125b313bd333a294888cfa7a463a8819f109b9a7
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -296,6 +296,18 @@ def testHelpTextKeywordOnlyArgumentsWithoutDefault(self): | |||||||||||
| self.assertIn('NAME\n double', output) | ||||||||||||
| self.assertIn('FLAGS\n --count=COUNT (required)', output) | ||||||||||||
|
|
||||||||||||
| @testutils.skipIf( | ||||||||||||
| six.PY2, | ||||||||||||
| 'Python 2 does not support required name-only arguments.') | ||||||||||||
| def testHelpTextFunctionMixedDefaults(self): | ||||||||||||
| component = tc.py3.HelpTextComponent().identity | ||||||||||||
| t = trace.FireTrace(component, name='FunctionMixedDefaults') | ||||||||||||
| output = helptext.HelpText(component, trace=t) | ||||||||||||
| self.assertIn('NAME\n FunctionMixedDefaults', output) | ||||||||||||
| self.assertIn('FunctionMixedDefaults <flags>', output) | ||||||||||||
| self.assertIn('--alpha=ALPHA (required)', output) | ||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (testing): Consider adding assertions for edge cases in testHelpTextFunctionMixedDefaults. The test currently checks for the presence of flags with and without defaults. It would be beneficial to include assertions for edge cases such as missing flags or incorrect default values to ensure robustness.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this comment correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this comment helpful? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the comment type correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the comment area correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What type of LLM test could this comment become?
|
||||||||||||
| self.assertIn('--beta=BETA\n Default: \'0\'', output) | ||||||||||||
|
|
||||||||||||
| def testHelpScreen(self): | ||||||||||||
| component = tc.ClassWithDocstring() | ||||||||||||
| t = trace.FireTrace(component, name='ClassWithDocstring') | ||||||||||||
|
|
||||||||||||
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.
suggestion (bug_risk): Consider handling the case where
kwonlydefaultsis None.If
spec.kwonlydefaultsis None, this code will raise an AttributeError. It might be safer to check ifkwonlydefaultsis not None before checking ifflagis inkwonlydefaults.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.
Is this comment correct?
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.
Is this comment helpful?
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.
Is the comment type correct?
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.
Is the comment area correct?
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.
What type of LLM test could this comment become?