Skip to content

Commit 7c3a0f6

Browse files
authored
Merge pull request #552 from python/main
Speed up test_urlsplit_normalization (pythonGH-26688)
2 parents 2207b3f + c0f2fcf commit 7c3a0f6

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)