From: Benjamin Peterson Date: Fri, 4 Apr 2014 17:56:26 +0000 (-0400) Subject: properly explicitly close file (#21128) X-Git-Tag: v2.7.7rc1~87 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7b26a5a32d1c0889a98fc8d487d92f5b822aa428;p=thirdparty%2FPython%2Fcpython.git properly explicitly close file (#21128) --- diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py index ac2aafa1ce49..4f2c9ef5b603 100644 --- a/Lib/test/test_file.py +++ b/Lib/test/test_file.py @@ -300,6 +300,7 @@ class OtherFileTests(unittest.TestCase): self.fail("readlines() after next() with empty buffer " "failed. Got %r, expected %r" % (line, testline)) # Reading after iteration hit EOF shouldn't hurt either + f.close() f = self.open(TESTFN, 'rb') try: for line in f: