From: Guido van Rossum Date: Tue, 6 Aug 2002 15:58:24 +0000 (+0000) Subject: Add next and __iter__ to the list of file methods that should raise X-Git-Tag: v2.3c1~4675 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c668c1256fb1ae3233af3f906891c4d8625c717;p=python Add next and __iter__ to the list of file methods that should raise ValueError when called for a closed file. --- diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py index 1eb84185f4..be1b2de88e 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')