mirror of https://github.com/python/cpython
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:
parent
7a6e95948c
commit
3c668c1256
|
@ -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')
|
||||
|
||||
|
|
Loading…
Reference in New Issue