@@ -103,7 +103,7 @@ def test_fileno(self):
103103 # Make sure fd returned by fileno is valid.
104104 with self .urlopen ("http://www.python.org/" , timeout = None ) as open_url :
105105 fd = open_url .fileno ()
106- with os .fdopen (fd , encoding = 'utf-8 ' ) as f :
106+ with os .fdopen (fd , 'rb ' ) as f :
107107 self .assertTrue (f .read (), "reading from file created using fd "
108108 "returned by fileno failed" )
109109
@@ -150,7 +150,7 @@ def test_basic(self):
150150 with self .urlretrieve ("http://www.python.org/" ) as (file_location , info ):
151151 self .assertTrue (os .path .exists (file_location ), "file location returned by"
152152 " urlretrieve is not a valid path" )
153- with open (file_location , encoding = 'utf-8 ' ) as f :
153+ with open (file_location , 'rb ' ) as f :
154154 self .assertTrue (f .read (), "reading from the file location returned"
155155 " by urlretrieve failed" )
156156
@@ -160,7 +160,7 @@ def test_specified_path(self):
160160 support .TESTFN ) as (file_location , info ):
161161 self .assertEqual (file_location , support .TESTFN )
162162 self .assertTrue (os .path .exists (file_location ))
163- with open (file_location , encoding = 'utf-8 ' ) as f :
163+ with open (file_location , 'rb ' ) as f :
164164 self .assertTrue (f .read (), "reading from temporary file failed" )
165165
166166 def test_header (self ):
@@ -169,7 +169,7 @@ def test_header(self):
169169 self .assertIsInstance (info , email .message .Message ,
170170 "info is not an instance of email.message.Message" )
171171
172- logo = "http://www.python.org/community/logos /python-logo-master-v3-TM.png"
172+ logo = "http://www.python.org/static/community_logos /python-logo-master-v3-TM.png"
173173
174174 def test_data_header (self ):
175175 with self .urlretrieve (self .logo ) as (file_location , fileheaders ):
0 commit comments