diff options
author | Stéphane Bidoul <stephane.bidoul@gmail.com> | 2023-04-07 23:49:38 +0200 |
---|---|---|
committer | Stéphane Bidoul <stephane.bidoul@gmail.com> | 2023-04-07 23:49:38 +0200 |
commit | 540f8fbb6d294032f318d58ebadec162f1ea0228 (patch) | |
tree | 140184a951952f784643b2c173c7ceea977cec7e /tests | |
parent | 48152bb2e147f11a350b9b7c90057b15b6ba70ea (diff) | |
download | pip-540f8fbb6d294032f318d58ebadec162f1ea0228.tar.gz |
Keep empty hash, as before
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/test_collector.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/unit/test_collector.py b/tests/unit/test_collector.py index bbb631cf8..e855d78e1 100644 --- a/tests/unit/test_collector.py +++ b/tests/unit/test_collector.py @@ -1061,8 +1061,11 @@ def test_link_collector_create_find_links_expansion( ), # "xsha256" is not a valid algorithm, so we discard it. ("https://pypi.org/pip-18.0.tar.gz#xsha256=aa113592bbe", None), - # Discard empty hash. - ("https://pypi.org/pip-18.0.tar.gz#sha256=", None), + # Empty hash. + ( + "https://pypi.org/pip-18.0.tar.gz#sha256=", + LinkHash("sha256", ""), + ), ( "https://pypi.org/pip-18.0.tar.gz#md5=aa113592bbe", LinkHash("md5", "aa113592bbe"), @@ -1080,6 +1083,7 @@ def test_link_hash_parsing(url: str, result: Optional[LinkHash]) -> None: "dist_info_metadata, result", [ ("sha256=aa113592bbe", LinkHash("sha256", "aa113592bbe")), + ("sha256=", LinkHash("sha256", "")), ("sha500=aa113592bbe", None), ("true", None), ("", None), |