-
-
Notifications
You must be signed in to change notification settings - Fork 21
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 implied assertion in WheelInfo #145
base: main
Are you sure you want to change the base?
Changes from all commits
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 | ||||
---|---|---|---|---|---|---|
|
@@ -7,17 +7,21 @@ | |||||
"path", | ||||||
[ | ||||||
SNOWBALL_WHEEL, | ||||||
f"/{SNOWBALL_WHEEL}" f"a/{SNOWBALL_WHEEL}", | ||||||
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. I think this is a mistake, and a |
||||||
f"/{SNOWBALL_WHEEL}", | ||||||
f"a/{SNOWBALL_WHEEL}", | ||||||
f"/a/{SNOWBALL_WHEEL}", | ||||||
f"//a/{SNOWBALL_WHEEL}", | ||||||
], | ||||||
) | ||||||
@pytest.mark.parametrize("protocol", ["https:", "file:", "emfs:", ""]) | ||||||
@pytest.mark.parametrize( | ||||||
"protocol", | ||||||
["http:", "https:", "file:", "emfs:", ""], | ||||||
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. I have no clue what emfs is.. 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. It stands for "Emscripten file system". It's needed because |
||||||
) | ||||||
def test_parse_wheel_url1(protocol, path): | ||||||
pytest.importorskip("packaging") | ||||||
from micropip.transaction import WheelInfo | ||||||
|
||||||
url = protocol + path | ||||||
url = protocol + path if protocol else "file:///" + path | ||||||
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. Why not put
Suggested change
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. It's me I'm dumb I need to put that lower; I want to check that |
||||||
wheel = WheelInfo.from_url(url) | ||||||
assert wheel.name == "snowballstemmer" | ||||||
assert str(wheel.version) == "2.0.0" | ||||||
|
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.
It's not entirely clear if the typo here was on purpose.
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.
Looks pretty accidental to me. If it were on purpose you would expect a comment.