mirror of
https://github.com/python/cpython.git
synced 2025-12-07 17:57:56 +00:00
Fix test: readline() now returns bytes
This commit is contained in:
parent
66dc8c59be
commit
3e18615496
1 changed files with 2 additions and 2 deletions
|
|
@ -54,8 +54,8 @@ class urlopenNetworkTests(unittest.TestCase):
|
||||||
# Test both readline and readlines.
|
# Test both readline and readlines.
|
||||||
open_url = urllib.urlopen("http://www.python.org/")
|
open_url = urllib.urlopen("http://www.python.org/")
|
||||||
try:
|
try:
|
||||||
self.assert_(isinstance(open_url.readline(), basestring),
|
self.assert_(isinstance(open_url.readline(), bytes),
|
||||||
"readline did not return a string")
|
"readline did not return bytes")
|
||||||
self.assert_(isinstance(open_url.readlines(), list),
|
self.assert_(isinstance(open_url.readlines(), list),
|
||||||
"readlines did not return a list")
|
"readlines did not return a list")
|
||||||
finally:
|
finally:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue