[Python-checkins] bpo-36948: Fix test_urlopener_retrieve_file on Windows (GH-13476)

Berker Peksag webhook-mailer at python.org
Tue May 21 19:00:39 EDT 2019


https://github.com/python/cpython/commit/2725cb01d7cbf5caecb51cc20d97ba324b09ce96
commit: 2725cb01d7cbf5caecb51cc20d97ba324b09ce96
branch: master
author: Berker Peksag <berker.peksag at gmail.com>
committer: GitHub <noreply at github.com>
date: 2019-05-22T02:00:35+03:00
summary:

bpo-36948: Fix test_urlopener_retrieve_file on Windows (GH-13476)

files:
M Lib/test/test_urllib.py

diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index 74b19fbdcd8d..6b995fef8cb5 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -1470,7 +1470,8 @@ def test_urlopener_retrieve_file(self):
             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):



More information about the Python-checkins mailing list