]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
fuse: runtests: Make test numbers (and everything in general) 0-indexed for consistency.
authornejucomo <nejucomo@gmail.com>
Sat, 7 Jun 2008 06:19:15 +0000 (23:19 -0700)
committernejucomo <nejucomo@gmail.com>
Sat, 7 Jun 2008 06:19:15 +0000 (23:19 -0700)
contrib/fuse/runtests.py

index ae840955ac6b71f69d05051920e454edcd55ddb0..494a31f294e86b94606bf134179cc7b01931d273 100644 (file)
@@ -255,11 +255,11 @@ class SystemTest (object):
         return results
 
     def run_test_layer(self, fbcap, mp):
-        total = failures = 0
         testnames = [n for n in sorted(dir(self)) if n.startswith('test_')]
-        for name in testnames:
-            total += 1
-            print '\n*** Running test #%d: %s' % (total, name)
+
+        failures = 0
+        for testnum, name in enumerate(testnames):
+            print '\n*** Running test #%d: %s' % (testnum, name)
             try:
                 testcap = self.create_dirnode()
                 self.attach_node(fbcap, testcap, name)
@@ -274,7 +274,7 @@ class SystemTest (object):
                 print 'Error in test code...  Cleaning up.'
                 raise
 
-        return (failures, total)
+        return (failures, len(testnames))
 
 
     # Tests: