mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix resource warning in test_file. Patch by Brian Brazil.
This commit is contained in:
parent
bfa3470b85
commit
a6e9502ab9
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue