mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
#2353: raise Py3k warning in file.xreadlines().
This commit is contained in:
parent
c76ffca2be
commit
a9916b55de
3 changed files with 21 additions and 3 deletions
|
@ -123,6 +123,13 @@ class TestPy3KWarnings(unittest.TestCase):
|
|||
with catch_warning() as w:
|
||||
self.assertWarning(buffer('a'), w, expected)
|
||||
|
||||
def test_file_xreadlines(self):
|
||||
expected = ("f.xreadlines() not supported in 3.x, "
|
||||
"try 'for line in f' instead")
|
||||
with file(__file__) as f:
|
||||
with catch_warning() as w:
|
||||
self.assertWarning(f.xreadlines(), w, expected)
|
||||
|
||||
|
||||
class TestStdlibRemovals(unittest.TestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue