]> granicus.if.org Git - python/commitdiff
Add next and __iter__ to the list of file methods that should raise
authorGuido van Rossum <guido@python.org>
Tue, 6 Aug 2002 15:58:24 +0000 (15:58 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 6 Aug 2002 15:58:24 +0000 (15:58 +0000)
ValueError when called for a closed file.

Lib/test/test_file.py

index 1eb84185f427b8be2fe687f08710756bc1dafff0..be1b2de88e9aa893fabd4fde492a202d7f5f2c81 100644 (file)
@@ -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')