Skip to content

Commit 830261e

Browse files
aignasrickeylev
andauthored
test(pypi): add a test case for simpleapi html parsing with % (#2811)
In addition to #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. --------- Co-authored-by: Richard Levasseur <richardlev@gmail.com> Co-authored-by: Richard Levasseur <rlevasseur@google.com>
1 parent 1d69ad6 commit 830261e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/pypi/parse_simpleapi_html/parse_simpleapi_html_tests.bzl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,25 @@ 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+
# A URL with % could occur if directly written in requirements.
321+
url = "https://example.org/whl/cpu/torch-2.6.0%2Bcpu-cp39-cp39-manylinux_2_28_aarch64.whl",
322+
yanked = False,
323+
),
324+
),
306325
]
307326

308327
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