Merge with stable
authorChristian Ebert <blacktrash@gmx.net>
Tue, 15 Feb 2011 10:40:29 +0100
changeset 881 cd432ceb6544
parent 879 0738a9d72c57 (current diff)
parent 880 0b9f0c42b566 (diff)
child 883 460ab7a133ac
Merge with stable
--- a/tests/run-tests.py	Fri Feb 11 04:55:00 2011 +0100
+++ b/tests/run-tests.py	Tue Feb 15 10:40:29 2011 +0100
@@ -231,6 +231,8 @@
                 if line and not line.startswith('#'):
                     blacklist[line] = filename
 
+            f.close()
+
         options.blacklist = blacklist
 
     return (options, args)
@@ -491,6 +493,8 @@
             # non-command/result - queue up for merged output
             after.setdefault(pos, []).append(l)
 
+    t.close()
+
     script.append('echo %s %s $?\n' % (salt, n + 1))
 
     fd, name = tempfile.mkstemp(suffix='hg-tst')
@@ -927,7 +931,9 @@
                 continue
 
             if options.keywords:
-                t = open(test).read().lower() + test.lower()
+                fp = open(test)
+                t = fp.read().lower() + test.lower()
+                fp.close()
                 for k in options.keywords.lower().split():
                     if k in t:
                         break