Kaydet (Commit) a6e9502a authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Fix resource warning in test_file. Patch by Brian Brazil.

üst bfa3470b
......@@ -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:
......
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