summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-08-06 15:58:24 (GMT)
committerGuido van Rossum <guido@python.org>2002-08-06 15:58:24 (GMT)
commit3c668c1256fb1ae3233af3f906891c4d8625c717 (patch)
tree4708651f0f07912f6d2251275be9066b56ee1e4e /Lib
parent7a6e95948cd2e163c066943f755d85007c306047 (diff)
downloadcpython-3c668c1256fb1ae3233af3f906891c4d8625c717.zip
cpython-3c668c1256fb1ae3233af3f906891c4d8625c717.tar.gz
cpython-3c668c1256fb1ae3233af3f906891c4d8625c717.tar.bz2
Add next and __iter__ to the list of file methods that should raise
ValueError when called for a closed file.
Diffstat (limited to 'Lib')
-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 1eb8418..be1b2de 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')