Skip to content

Commit e91143b

Browse files
committed
test(pypi): add a test case for simpleapi html parsing with %
In addition to bazel-contrib#2801 I wanted to ensure that we are getting the correct filename when downloading wheels. It seems that the `%` in the wheel filename might get through wheels that get referenced via direct URL in the requirements.txt files.
1 parent e14cd37 commit e91143b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/pypi/parse_simpleapi_html/parse_simpleapi_html_tests.bzl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,24 @@ def _test_whls(env):
303303
yanked = False,
304304
),
305305
),
306+
(
307+
struct(
308+
attrs = [
309+
'href="/whl/cpu/torch-2.6.0%2Bcpu-cp39-cp39-manylinux_2_28_aarch64.whl#sha256=deadbeef"',
310+
],
311+
filename = "torch-2.6.0+cpu-cp39-cp39-manylinux_2_28_aarch64.whl",
312+
url = "https://example.org/",
313+
),
314+
struct(
315+
filename = "torch-2.6.0+cpu-cp39-cp39-manylinux_2_28_aarch64.whl",
316+
metadata_sha256 = "",
317+
metadata_url = "",
318+
sha256 = "deadbeef",
319+
version = "2.6.0+cpu",
320+
url = "https://example.org/whl/cpu/torch-2.6.0%2Bcpu-cp39-cp39-manylinux_2_28_aarch64.whl",
321+
yanked = False,
322+
),
323+
),
306324
]
307325

308326
for (input, want) in tests:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy