commit | a6e9502ab9cdc35343bfa86e3676e7801ac733cb | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Sat Oct 30 14:22:43 2010 +0000 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Sat Oct 30 14:22:43 2010 +0000 |
tree | e338f546fa0cde98530f34b3be5888e9ee83e40d | |
parent | bfa3470b85960c35b916ddb14189a5867a344103 [diff] |
Fix resource warning in test_file. Patch by Brian Brazil.
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py index ebaa38b..c48b8d0 100644 --- a/Lib/test/test_file.py +++ b/Lib/test/test_file.py
@@ -303,6 +303,8 @@ if lines != testlines: self.fail("readlines() after next() with empty buffer " "failed. Got %r, expected %r" % (line, testline)) + f.close() + # Reading after iteration hit EOF shouldn't hurt either f = self.open(TESTFN, 'rb') try: