diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-30 14:22:43 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-30 14:22:43 (GMT) |
commit | a6e9502ab9cdc35343bfa86e3676e7801ac733cb (patch) | |
tree | e338f546fa0cde98530f34b3be5888e9ee83e40d | |
parent | bfa3470b85960c35b916ddb14189a5867a344103 (diff) | |
download | cpython-a6e9502ab9cdc35343bfa86e3676e7801ac733cb.zip cpython-a6e9502ab9cdc35343bfa86e3676e7801ac733cb.tar.gz cpython-a6e9502ab9cdc35343bfa86e3676e7801ac733cb.tar.bz2 |
Fix resource warning in test_file. Patch by Brian Brazil.
-rw-r--r-- | Lib/test/test_file.py | 2 |
1 files changed, 2 insertions, 0 deletions
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 @@ class OtherFileTests(unittest.TestCase): 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: |