Skip to content

Commit 8797e1a

Browse files
authored
gh-77476: Remove urllib HTTP test (#139502)
Remove test_sites_no_connection_close() which is skipped since 2018 (commit 36d56ea).
1 parent 46a1f0a commit 8797e1a

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

Lib/test/test_urllib2net.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -218,27 +218,6 @@ def test_custom_headers(self):
218218
opener.open(request)
219219
self.assertEqual(request.get_header('User-agent'),'Test-Agent')
220220

221-
@unittest.skip('XXX: http://www.imdb.com is gone')
222-
def test_sites_no_connection_close(self):
223-
# Some sites do not send Connection: close header.
224-
# Verify that those work properly. (#issue12576)
225-
226-
URL = 'http://www.imdb.com' # mangles Connection:close
227-
228-
with socket_helper.transient_internet(URL):
229-
try:
230-
with urllib.request.urlopen(URL) as res:
231-
pass
232-
except ValueError:
233-
self.fail("urlopen failed for site not sending \
234-
Connection:close")
235-
else:
236-
self.assertTrue(res)
237-
238-
req = urllib.request.urlopen(URL)
239-
res = req.read()
240-
self.assertTrue(res)
241-
242221
def _test_urls(self, urls, handlers, retry=True):
243222
import time
244223
import logging

0 commit comments

Comments
 (0)