mirror of https://github.com/python/cpython
Fix resource warning in test_file. Patch by Brian Brazil.
This commit is contained in:
parent
bfa3470b85
commit
a6e9502ab9
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue