-
Notifications
You must be signed in to change notification settings - Fork 135
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
[issue-586] fix CLI #588
[issue-586] fix CLI #588
Conversation
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.
Thanks for the addition :)
tests/spdx/test_cli.py
Outdated
("-i", os.path.join(os.path.dirname(__file__), "data/SPDXJSONExample-v2.3.spdx.json"), "-o", "-"), | ||
], | ||
) | ||
def test_cli(options: Tuple[str, str]): |
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.
I'm not sure about this type hint, as there are different numbers of strings in the passed tuples. In the test below there is no type hint, either, so maybe just omit it...?
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.
Yeah sure, that was a blind copy and paste mistake
290497c
to
e56ba7b
Compare
tests/spdx/test_cli.py
Outdated
("-i", os.path.join(os.path.dirname(__file__), "data/SPDXJSONExample-v2.3.spdx.json"), "-o"), | ||
], | ||
) | ||
def test_cli_with_system_exit(options): |
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.
Sorry, one other thing; every CLI call has a system exit, the important part here is the exit code:
def test_cli_with_system_exit(options): | |
def test_cli_with_system_exit_code_2(options): |
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.
maybe also adapt the other test name to be consistent
fcceed9
to
e9886ae
Compare
… when no arguments are given Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
With this PR we make infile a required argument to display a help message when no arguments are given.
I also added some test to check that the cli fails for invalid arguments and passes for correct arguments.
fixes #586