mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #4608: urllib.request.urlopen does not return an iterable object
This commit is contained in:
commit
29e2c64edd
3 changed files with 12 additions and 6 deletions
|
@ -110,8 +110,9 @@ class urlopen_FileTests(unittest.TestCase):
|
|||
# Test iterator
|
||||
# Don't need to count number of iterations since test would fail the
|
||||
# instant it returned anything beyond the first line from the
|
||||
# comparison
|
||||
for line in self.returned_obj.__iter__():
|
||||
# comparison.
|
||||
# Use the iterator in the usual implicit way to test for ticket #4608.
|
||||
for line in self.returned_obj:
|
||||
self.assertEqual(line, self.text)
|
||||
|
||||
class ProxyTests(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue