mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue