Mercurial > ~astiob > upreckon > hgweb
diff testcases.py @ 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 | c62c9bfd614a |
children | 4e6f231f055f |
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