Skip to content

Commit b03b10d

Browse files
committed
Add test for unquoted non-ASCII character in URL.
1 parent f123044 commit b03b10d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_urllib.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,9 @@ def test_url2pathname_posix(self):
16191619
def test_url2pathname_nonascii(self):
16201620
encoding = sys.getfilesystemencoding()
16211621
errors = sys.getfilesystemencodeerrors()
1622-
url = urllib.parse.quote(os_helper.FS_NONASCII, encoding=encoding, errors=errors)
1622+
url = os_helper.FS_NONASCII
1623+
self.assertEqual(urllib.request.url2pathname(url), os_helper.FS_NONASCII)
1624+
url = urllib.parse.quote(url, encoding=encoding, errors=errors)
16231625
self.assertEqual(urllib.request.url2pathname(url), os_helper.FS_NONASCII)
16241626

16251627
class Utility_Tests(unittest.TestCase):

0 commit comments

Comments
 (0)