Skip to content

Commit c0f2fcf

Browse files
Speed up test_urlsplit_normalization (GH-26688)
1 parent 92a5c08 commit c0f2fcf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_urlparse.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,8 @@ def test_urlsplit_normalization(self):
10791079
hex_chars = {'{:04X}'.format(ord(c)) for c in illegal_chars}
10801080
denorm_chars = [
10811081
c for c in map(chr, range(128, sys.maxunicode))
1082-
if (hex_chars & set(unicodedata.decomposition(c).split()))
1082+
if unicodedata.decomposition(c)
1083+
and (hex_chars & set(unicodedata.decomposition(c).split()))
10831084
and c not in illegal_chars
10841085
]
10851086
# Sanity check that we found at least one such character

0 commit comments

Comments
 (0)