Skip to content

Commit 100330d

Browse files
committed
Test cases for percent-encoded ? and #
1 parent 5b4de36 commit 100330d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/test_urllib.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,10 @@ def test_url2pathname(self):
15301530
self.assertEqual(fn('foo#bar'), 'foo')
15311531
self.assertEqual(fn('foo?bar=baz'), 'foo')
15321532
self.assertEqual(fn('foo?bar#baz'), 'foo')
1533+
self.assertEqual(fn('foo%3Fbar'), 'foo?bar')
1534+
self.assertEqual(fn('foo%23bar'), 'foo#bar')
1535+
self.assertEqual(fn('foo%3Fbar%3Dbaz'), 'foo?bar=baz')
1536+
self.assertEqual(fn('foo%3Fbar%23baz'), 'foo?bar#baz')
15331537

15341538
def test_url2pathname_require_scheme(self):
15351539
sep = os.path.sep

0 commit comments

Comments
 (0)