File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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' )
You can’t perform that action at this time.
0 commit comments