Skip to content

Commit 0cc3a67

Browse files
committed
More test fixes
1 parent 4b320b8 commit 0cc3a67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_urllib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ def test_missing_localfile(self):
529529

530530
def test_file_notexists(self):
531531
fd, tmp_file = tempfile.mkstemp()
532-
tmp_fileurl = 'file://localhost' + tmp_file.replace(os.path.sep, '/')
532+
tmp_fileurl = 'file:' + urllib.request.pathname2url(tmp_file)
533533
try:
534534
self.assertTrue(os.path.exists(tmp_file))
535535
with urlopen(tmp_fileurl) as fobj:

0 commit comments

Comments
 (0)