Add next and __iter__ to the list of file methods that should raise

ValueError when called for a closed file.
This commit is contained in:
Guido van Rossum 2002-08-06 15:58:24 +00:00
parent 7a6e95948c
commit 3c668c1256
1 changed files with 3 additions and 1 deletions

View 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')