changeset 99:9b41934b2e95

Fixed a major regression introduced in changeset 1fb319ec33af testcases.load_problem now always handles the True sent by Problem.test.
author Oleg Oshmyan <chortos@inbox.lv>
date Wed, 02 Mar 2011 20:03:44 +0000
parents 62a96d51bf94
children 995502cdafc6
files testcases.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/testcases.py	Wed Mar 02 19:52:03 2011 +0000
+++ b/testcases.py	Wed Mar 02 20:03:44 2011 +0000
@@ -428,7 +428,8 @@
 			yield DummyTestContext()
 			for i in prob.config.dummies:
 				s = str(i).zfill(prob.config.paddummies)
-				yield _types[prob.config.kind](prob, s, True, 0)
+				if (yield _types[prob.config.kind](prob, s, True, 0)):
+					yield
 			yield problem.test_context_end
 		for k, group in enumerate(prob.config.tests):
 			if not group:
@@ -449,7 +450,9 @@
 			prob.cache.padoutput = max(prob.cache.padoutput, len(s))
 		for i in prob.config.dummies:
 			s = str(i).zfill(prob.config.paddummies)
-			yield _types[prob.config.kind](prob, s, True, 0)
+			if (yield _types[prob.config.kind](prob, s, True, 0)):
+				yield
 		for j, i in enumerate(prob.config.tests):
 			s = str(i).zfill(prob.config.padtests)
-			yield _types[prob.config.kind](prob, s, False, getpoints(i, j))
\ No newline at end of file
+			if (yield _types[prob.config.kind](prob, s, False, getpoints(i, j))):
+				yield
\ No newline at end of file