changeset 89:3ae6cb69e4ef

Sample total is no longer printed if there are no samples
author Oleg Oshmyan <chortos@inbox.lv>
date Mon, 28 Feb 2011 15:10:40 +0000
parents cd347cfca272
children 1fb319ec33af
files testcases.py
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/testcases.py	Mon Feb 28 11:28:46 2011 +0000
+++ b/testcases.py	Mon Feb 28 15:10:40 2011 +0000
@@ -404,11 +404,12 @@
 			for i in group:
 				s = str(i).zfill(prob.config.padtests)
 				prob.cache.padoutput = max(prob.cache.padoutput, len(s))
-		yield DummyTestContext()
-		for i in prob.config.dummies:
-			s = str(i).zfill(prob.config.paddummies)
-			yield _types[prob.config.kind](prob, s, True, 0)
-		yield problem.test_context_end
+		if prob.config.dummies:
+			yield DummyTestContext()
+			for i in prob.config.dummies:
+				s = str(i).zfill(prob.config.paddummies)
+				yield _types[prob.config.kind](prob, s, True, 0)
+			yield problem.test_context_end
 		for k, group in enumerate(prob.config.tests):
 			if not group:
 				continue