We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a247dd3 commit b4fd462Copy full SHA for b4fd462
Lib/test/test_urllib2.py
@@ -850,14 +850,16 @@ def test_file(self):
850
self.assertEqual(headers["Last-modified"], modified)
851
self.assertEqual(respurl, canonurl)
852
853
+ _, cwd = os.path.splitdrive(os.getcwd())
854
+ cwd = cwd.replace("\\", "/")
855
for url in [
856
parsed._replace(netloc='localhost:80').geturl(),
857
"file:///file_does_not_exist.txt",
858
"file://not-a-local-host.com//dir/file.txt",
859
"file://%s:80%s/%s" % (socket.gethostbyname('localhost'),
- os.getcwd(), TESTFN),
860
+ cwd, TESTFN),
861
"file://somerandomhost.ontheinternet.com%s/%s" %
- (os.getcwd(), TESTFN),
862
+ (cwd, TESTFN),
863
]:
864
try:
865
f = open(TESTFN, "wb")
0 commit comments