diff testcases.py @ 58:c95addbe0851

Fixed test group support
author Oleg Oshmyan <chortos@inbox.lv>
date Tue, 21 Dec 2010 03:04:43 +0200
parents 855bdfeb32a6
children 24f144e11b5e
line wrap: on
line diff
--- a/testcases.py	Tue Dec 21 02:28:57 2010 +0200
+++ b/testcases.py	Tue Dec 21 03:04:43 2010 +0200
@@ -585,7 +585,7 @@
 	
 	if options.legacy:
 		prob.config.usegroups = False
-		prob.config.tests = list(prob.config.tests)
+		newtests = []
 		for i, name in enumerate(prob.config.tests):
 			# Same here; we'll need to iterate over them twice
 			try:
@@ -596,11 +596,12 @@
 				except TypeError:
 					name = (name,)
 				l = len(name)
-			if len(name) > 1:
+			if l > 1:
 				prob.config.usegroups = True
-				break
-			elif not len(name):
-				prob.config.tests[i] = (name,)
+			newtests.append(name)
+		if prob.config.usegroups:
+			prob.config.tests = newtests
+		del newtests
 	
 	# First get prob.cache.padoutput right,
 	# then yield the actual test cases