run-tests: regroup nested functions stable
authorMatt Mackall <mpm@selenic.com>
Fri, 24 May 2013 13:48:25 -0500
branchstable
changeset 1232 8730a2885d7c
parent 1231 c6a4dd8d18a9
child 1233 e15c19e34344
run-tests: regroup nested functions [ original upstream message ]
tests/run-tests.py
--- a/tests/run-tests.py	Fri May 24 13:47:17 2013 -0500
+++ b/tests/run-tests.py	Fri May 24 13:48:25 2013 -0500
@@ -874,6 +874,11 @@
     def ignore(msg):
         result('i', (test, msg))
 
+    def describe(ret):
+        if ret < 0:
+            return 'killed by signal %d' % -ret
+        return 'returned error code %d' % ret
+
     if not os.path.exists(test):
             skip("doesn't exist")
             return None
@@ -967,11 +972,6 @@
             f.write(line)
         f.close()
 
-    def describe(ret):
-        if ret < 0:
-            return 'killed by signal %d' % -ret
-        return 'returned error code %d' % ret
-
     if skipped:
         mark = 's'
         if out is None:                 # debug mode: nothing to parse