Commit 7b26a5a3 authored by Benjamin Peterson's avatar Benjamin Peterson

properly explicitly close file (#21128)

parent d7ffb77e
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment