-
Notifications
You must be signed in to change notification settings - Fork 3k
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
warn user when requested extra does not exist - 2138 #2142
Changes from 27 commits
8900f4f
deabed5
91f8010
fec9f4f
53f3346
89bff4a
b079184
8266863
db50fe6
6c5edf5
c5d331b
5fcf2d6
5d3d8ab
2e30c47
cb1962e
8a09436
d3e207e
19cf33e
8d0cd56
70351bb
ee9a7cd
5e62ad9
86e3300
50237f4
704223d
f38e100
4dfbd2e
3a1a45a
55585d0
97b03f4
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 |
---|---|---|
|
@@ -51,3 +51,55 @@ def test_no_extras_uninstall(script): | |
# openid should not be uninstalled | ||
initools_folder = script.site_packages / 'openid' | ||
assert initools_folder not in result2.files_deleted, result.files_deleted | ||
|
||
|
||
def test_non_existant_extra_warns_user_no_wheel(script, data): | ||
""" | ||
A warning is logged telling the user that the extra option they requested | ||
does not exist in the project they are wishing to install. | ||
|
||
This exercises source installs. | ||
""" | ||
result = script.pip( | ||
'install', '--no-use-wheel', '--no-index', | ||
'--find-links=' + data.find_links, | ||
'simple[nonexistant]', expect_stderr=True, | ||
) | ||
assert ( | ||
"Unknown 3.0 does not provide the extra 'nonexistant'" | ||
in result.stdout | ||
) | ||
|
||
|
||
def test_non_existant_extra_warns_user_with_wheel(script, data): | ||
""" | ||
A warning is logged telling the user that the extra option they requested | ||
does not exist in the project they are wishing to install. | ||
|
||
This exercises wheel installs. | ||
""" | ||
result = script.pip( | ||
'install', '--use-wheel', '--no-index', | ||
'--find-links=' + data.find_links, | ||
'simplewheel[nonexistant]', expect_stderr=True, | ||
) | ||
assert ( | ||
"simplewheel 2.0 does not provide the extra 'nonexistant'" | ||
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. nonexistant => nonexistent |
||
in result.stdout | ||
) | ||
|
||
|
||
def test_non_existant_options_listed_in_order(script, data): | ||
""" | ||
Warn the user for each extra that doesn't exist. | ||
""" | ||
result = script.pip( | ||
'install', '--use-wheel', '--no-index', | ||
'--find-links=' + data.find_links, | ||
'simplewheel[nonexistant, nope]', expect_stderr=True, | ||
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. nonexistant => nonexistent 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. Well it's in a few places. Do a search & replace to catch all of them. |
||
) | ||
msg = ( | ||
" simplewheel 2.0 does not provide the extra 'nonexistant'\n" | ||
" simplewheel 2.0 does not provide the extra 'nope'" | ||
) | ||
assert msg in result.stdout |
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.
Mind if I ask for a bit of style consistency? You have
And