-
Notifications
You must be signed in to change notification settings - Fork 383
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
Add list --short option #804
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.
Cool, looks pretty good!
Could you add example output to the summary?
Should --short flag have precedence over --json flag?
These should be mutually exclusive. You should be able to do this with https://docs.python.org/3/library/argparse.html#mutual-exclusion.
Should --include-injected flag be accepted with --short?
Probably not, since it wouldn't be very short in that case. Thoughts @njthomas?
Done. |
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.
Look good, thank you!
def test_list_short(pipx_temp_env, monkeypatch, capsys): | ||
assert not run_pipx_cli(["install", PKG["pycowsay"]["spec"]]) | ||
assert not run_pipx_cli(["install", PKG["pylint"]["spec"]]) | ||
captured = capsys.readouterr() | ||
|
||
assert not run_pipx_cli(["list", "--short"]) | ||
captured = capsys.readouterr() | ||
|
||
assert "pycowsay 0.0.0.1" in captured.out | ||
assert "pylint 2.3.1" in captured.out |
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.
nice!
@cs01 but why did tests fail on macos? |
Where are you seeing that? (edit: nevermind, I see it now; it was hidden on my phone) Tests were failing on main until just a couple days ago so that may have been the reason. Either way everything is merged and passing now. |
docs/changelog.md
Summary of changes
#792
Should
--short
flag have precedence over--json
flag?Should
--include-injected
flag be accepted with--short
?Test plan
Tested by running