Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cc58363

Browse files
committed
urllib.py very recently changed to produce uppercase escapes, but no
corresponding changes were made to its std test.
1 parent 8880f6d commit cc58363

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

Lib/test/test_urllib.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99
'\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317' \
1010
'\320\321\322\323\324\325\326\330\331\332\333\334\335\336'
1111

12-
expected = 'abcdefghijklmnopqrstuvwxyz%df%e0%e1%e2%e3%e4%e5%e6%e7%e8%e9%ea%eb%ec%ed%ee%ef%f0%f1%f2%f3%f4%f5%f6%f8%f9%fa%fb%fc%fd%fe%ffABCDEFGHIJKLMNOPQRSTUVWXYZ%c0%c1%c2%c3%c4%c5%c6%c7%c8%c9%ca%cb%cc%cd%ce%cf%d0%d1%d2%d3%d4%d5%d6%d8%d9%da%db%dc%dd%de'
12+
expected = 'abcdefghijklmnopqrstuvwxyz' \
13+
'%DF%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE' \
14+
'%EF%F0%F1%F2%F3%F4%F5%F6%F8%F9%FA%FB%FC%FD%FE%FF' \
15+
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' \
16+
'%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF' \
17+
'%D0%D1%D2%D3%D4%D5%D6%D8%D9%DA%DB%DC%DD%DE'
1318

1419
test = urllib.quote(chars)
1520
verify(test == expected, "urllib.quote problem 1")
@@ -18,13 +23,13 @@
1823

1924
in1 = "abc/def"
2025
out1_1 = "abc/def"
21-
out1_2 = "abc%2fdef"
26+
out1_2 = "abc%2Fdef"
2227

2328
verify(urllib.quote(in1) == out1_1, "urllib.quote problem 2")
2429
verify(urllib.quote(in1, '') == out1_2, "urllib.quote problem 3")
2530

2631
in2 = "abc?def"
27-
out2_1 = "abc%3fdef"
32+
out2_1 = "abc%3Fdef"
2833
out2_2 = "abc?def"
2934

3035
verify(urllib.quote(in2) == out2_1, "urllib.quote problem 4")

0 commit comments

Comments
 (0)