GeezerVison is showing github.com — Added canonicalize_name() to console/commands/init.py by evanrittenhouse · Pull Request #5076 · python-poetry/poetry
Conversation
evanrittenhouse
commented
Jan 20, 2022
•
edited by finswimmer
Loading
Uh oh!
There was an error while loading. Please reload this page.
Pull Request Check List
Resolves: #5035
Resolves: #5033
- Added tests for changed code - didn't add tests, but new code passes all existing tests.
- Updated documentation for changed code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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 a lot. Looks good to me 👍
As discussed here my suggestion for a test:
You can take the test_interactive_with_dependencies as an example and play around with adding packages to the repo, give different spelling (upper/lower cases) of the package you search and always expect to find it in the first position.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Used canonicalize_name to standardize the names of all packages in
poetry init with interactive dependencies. Given its importance, added a
test_canoncalize_name() test to tests/utils/test_helpers.py
Parameterized a _generate_choice_list_packages fixture in order to call
the test with both > 10 and < 10 cases, verifying that output is <= 10
and the package_name has the desired package first in choices
Also added cases for truncation and non-truncation in
test_generate_choice_list to ensure the message is printed in only the
correct cases
Moved info_string generation logic out of init._generate_choice_list
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 a lot for your contribution. Looks good to me 👍
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.