Skip to content

Commit 39590e8

Browse files
committed
CVE-2023-24239 Remove some tests that can't fail anymore
Because we now strip spaces, these tests can't fail
1 parent 37720c9 commit 39590e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_urlparse.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,9 @@ def test_attributes_bad_port(self):
683683
"""Check handling of invalid ports."""
684684
for bytes in (False, True):
685685
for parse in (urlparse.urlsplit, urlparse.urlparse):
686-
for port in ("foo", "1.5", "-1", "0x10", "-0", "1_1", " 1", "1 ", "६"):
686+
# Spaces are stripped now, so they can't cause issues
687+
# for port in ("foo", "1.5", "-1", "0x10", "-0", "1_1", " 1", "1 ", "६"):
688+
for port in ("foo", "1.5", "-1", "0x10", "-0", "1_1", "६"):
687689
netloc = "www.example.net:" + port
688690
url = "http://" + netloc + "/"
689691
if bytes:

0 commit comments

Comments
 (0)