8000 Windows test fixes #4 · barneygale/cpython@d4befde · GitHub
[go: up one dir, main page]

Skip to content

Commit d4befde

Browse files
committed
Windows test fixes python#4
1 parent 73c8bcf commit d4befde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_urllib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ def constructLocalFileUrl(self, filePath):
713713
filePath.encode("utf-8")
714714
except UnicodeEncodeError:
715715
raise unittest.SkipTest("filePath is not encodable to utf8")
716-
return "file://%s" % urllib.request.pathname2url(filePath)
716+
return urllib.request.pathname2url(filePath, include_scheme=True)
717717

718718
def createNewTempFile(self, data=b""):
719719
"""Creates a new temporary file containing the specified data,
@@ -1569,7 +1569,7 @@ def test_url2pathname_win(self):
15691569
self.assertEqual(fn("///C/test/"), '\\C\\test\\')
15701570
self.assertEqual(fn("////C/test/"), '\\\\C\\test\\')
15711571
# DOS drive paths
1572-
self.assertEqual(fn('C:/path/to/file'), 'C:\\path\\to\\file')
1572+
self.assertEqual(fn('file:C:/path/to/file'), 'C:\\path\\to\\file')
15731573
self.assertEqual(fn('C|/path/to/file'), 'C:\\path\\to\\file')
15741574
self.assertEqual(fn('/C|/path/to/file'), 'C:\\path\\to\\file')
15751575
self.assertEqual(fn('///C|/path/to/file'), 'C:\\path\\to\\file')

0 commit comments

Comments
 (0)
0