]> granicus.if.org Git - python/commitdiff
bpo-36948: Fix test_urlopener_retrieve_file on Windows (GH-13476)
authorBerker Peksag <berker.peksag@gmail.com>
Tue, 21 May 2019 23:00:35 +0000 (02:00 +0300)
committerGitHub <noreply@github.com>
Tue, 21 May 2019 23:00:35 +0000 (02:00 +0300)
Lib/test/test_urllib.py

index 74b19fbdcd8dbe66f78a0c6816ab7ff78637a648..6b995fef8cb561c996c2e03698b9fcfddb2af4fa 100644 (file)
@@ -1470,7 +1470,8 @@ class URLopener_Tests(FakeHTTPMixin, unittest.TestCase):
             os.close(fd)
             fileurl = "file:" + urllib.request.pathname2url(tmpfile)
             filename, _ = urllib.request.URLopener().retrieve(fileurl)
-            self.assertEqual(filename, tmpfile)
+            # Some buildbots have TEMP folder that uses a lowercase drive letter.
+            self.assertEqual(os.path.normcase(filename), os.path.normcase(tmpfile))
 
     @support.ignore_warnings(category=DeprecationWarning)
     def test_urlopener_retrieve_remote(self):