summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2011-06-26 12:30:25 (GMT)
committerRaymond Hettinger <python@rcn.com>2011-06-26 12:30:25 (GMT)
commit29e2c64edd9696483d51a24a6f74ae74815b441d (patch)
tree10dbf63f1cba853fa2e27f5f035809a8282f84e8 /Lib/test/test_urllib.py
parent58ff0039a3df47e240eed9f721f759c9db508202 (diff)
parent038018aaa4c4d1c8df7952adaa4df14ec3333496 (diff)
downloadcpython-29e2c64edd9696483d51a24a6f74ae74815b441d.zip
cpython-29e2c64edd9696483d51a24a6f74ae74815b441d.tar.gz
cpython-29e2c64edd9696483d51a24a6f74ae74815b441d.tar.bz2
Issue #4608: urllib.request.urlopen does not return an iterable object
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r--Lib/test/test_urllib.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index 2775a13..3fcf9a3 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -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):