[Python-checkins] r85977 - python/branches/py3k/Lib/test/test_file.py
antoine.pitrou
python-checkins at python.org
Sat Oct 30 16:22:44 CEST 2010
Author: antoine.pitrou
Date: Sat Oct 30 16:22:43 2010
New Revision: 85977
Log:
Fix resource warning in test_file. Patch by Brian Brazil.
Modified:
python/branches/py3k/Lib/test/test_file.py
Modified: python/branches/py3k/Lib/test/test_file.py
==============================================================================
--- python/branches/py3k/Lib/test/test_file.py (original)
+++ python/branches/py3k/Lib/test/test_file.py Sat Oct 30 16:22:43 2010
@@ -303,6 +303,8 @@
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:
More information about the Python-checkins
mailing list