[Python-checkins] cpython (3.4): merge 3.3 (#20695)

larry.hastings python-checkins at python.org
Mon Mar 17 07:32:27 CET 2014


http://hg.python.org/cpython/rev/a5247ea950d5
changeset:   89745:a5247ea950d5
branch:      3.4
user:        Benjamin Peterson <benjamin at python.org>
date:        Wed Feb 19 23:06:41 2014 -0500
summary:
  merge 3.3 (#20695)

files:
  Lib/test/test_urllibnet.py |  8 ++++----
  1 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py
--- a/Lib/test/test_urllibnet.py
+++ b/Lib/test/test_urllibnet.py
@@ -103,7 +103,7 @@
         # Make sure fd returned by fileno is valid.
         with self.urlopen("http://www.python.org/", timeout=None) as open_url:
             fd = open_url.fileno()
-            with os.fdopen(fd, encoding='utf-8') as f:
+            with os.fdopen(fd, 'rb') as f:
                 self.assertTrue(f.read(), "reading from file created using fd "
                                           "returned by fileno failed")
 
@@ -150,7 +150,7 @@
         with self.urlretrieve("http://www.python.org/") as (file_location, info):
             self.assertTrue(os.path.exists(file_location), "file location returned by"
                             " urlretrieve is not a valid path")
-            with open(file_location, encoding='utf-8') as f:
+            with open(file_location, 'rb') as f:
                 self.assertTrue(f.read(), "reading from the file location returned"
                                 " by urlretrieve failed")
 
@@ -160,7 +160,7 @@
                               support.TESTFN) as (file_location, info):
             self.assertEqual(file_location, support.TESTFN)
             self.assertTrue(os.path.exists(file_location))
-            with open(file_location, encoding='utf-8') as f:
+            with open(file_location, 'rb') as f:
                 self.assertTrue(f.read(), "reading from temporary file failed")
 
     def test_header(self):
@@ -169,7 +169,7 @@
             self.assertIsInstance(info, email.message.Message,
                                   "info is not an instance of email.message.Message")
 
-    logo = "http://www.python.org/community/logos/python-logo-master-v3-TM.png"
+    logo = "http://www.python.org/static/community_logos/python-logo-master-v3-TM.png"
 
     def test_data_header(self):
         with self.urlretrieve(self.logo) as (file_location, fileheaders):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list