summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-17 22:11:54 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-17 22:11:54 (GMT)
commita9916b55de0e42a4c171ff71972ab9cbce014a77 (patch)
tree23a00bd490e7174a6204b6d28249dfff48b135d1 /Lib
parentc76ffca2befde942bfa98e3972d5cead572c771a (diff)
downloadcpython-a9916b55de0e42a4c171ff71972ab9cbce014a77.zip
cpython-a9916b55de0e42a4c171ff71972ab9cbce014a77.tar.gz
cpython-a9916b55de0e42a4c171ff71972ab9cbce014a77.tar.bz2
#2353: raise Py3k warning in file.xreadlines().
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_py3kwarn.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py
index 1a65323..d64d66a 100644
--- a/Lib/test/test_py3kwarn.py
+++ b/Lib/test/test_py3kwarn.py
@@ -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):