summaryrefslogtreecommitdiff
path: root/Lib/test/test_file.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-08-06 15:58:24 +0000
committerGuido van Rossum <guido@python.org>2002-08-06 15:58:24 +0000
commitc608e7c572027f2c80bf62563c89871effcd8209 (patch)
tree2f3ba69ace208594eb21d4da4ebefa2a78c5554c /Lib/test/test_file.py
parent9a1307f87c20d8622ffa7aa752df357fd841adc3 (diff)
downloadcpython-c608e7c572027f2c80bf62563c89871effcd8209.tar.gz
Add next and __iter__ to the list of file methods that should raise
ValueError when called for a closed file.
Diffstat (limited to 'Lib/test/test_file.py')
-rw-r--r--Lib/test/test_file.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py
index 1eb84185f4..be1b2de88e 100644
--- a/Lib/test/test_file.py
+++ b/Lib/test/test_file.py
@@ -89,7 +89,9 @@ f.close()
if not f.closed:
raise TestFailed, 'file.closed should be true'
-methods = ['fileno', 'flush', 'isatty', 'read', 'readinto', 'readline', 'readlines', 'seek', 'tell', 'truncate', 'write', 'xreadlines' ]
+methods = ['fileno', 'flush', 'isatty', 'next', 'read', 'readinto',
+ 'readline', 'readlines', 'seek', 'tell', 'truncate', 'write',
+ 'xreadlines', '__iter__']
if sys.platform.startswith('atheos'):
methods.remove('truncate')