-
Notifications
You must be signed in to change notification settings - Fork 0
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
test: add get_args tests #24
Conversation
Reviewer's Guide by SourceryThis pull request adds unit tests for the File-Level Changes
Tips
|
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.
Hey @athith-g - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a test case for multiple file paths to ensure that scenario is handled correctly.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 2 issues found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was 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.
LGTM. Maybe one small thing that I would do is to create a helper function to patch sys.argv
:
@contextlib.contextmanager
def patch_cli(args):
with mock.patch("sys.argv", args):
yield
This would make it a bit easier to track what is being patched IMO, but it is a very minor comment.
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.
LGTM :)
Adds tests for get_args().
Summary by Sourcery
This pull request introduces unit tests for the
get_args
function, covering scenarios such as correct argument parsing, default output directory, invalid arguments, and missing file paths.get_args
function to ensure correct argument parsing, default values, and error handling.