Mercurial > ~astiob > upreckon > hgweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
98:62a96d51bf94 | 99:9b41934b2e95 |
---|---|
426 prob.cache.padoutput = max(prob.cache.padoutput, len(s)) | 426 prob.cache.padoutput = max(prob.cache.padoutput, len(s)) |
427 if prob.config.dummies: | 427 if prob.config.dummies: |
428 yield DummyTestContext() | 428 yield DummyTestContext() |
429 for i in prob.config.dummies: | 429 for i in prob.config.dummies: |
430 s = str(i).zfill(prob.config.paddummies) | 430 s = str(i).zfill(prob.config.paddummies) |
431 yield _types[prob.config.kind](prob, s, True, 0) | 431 if (yield _types[prob.config.kind](prob, s, True, 0)): |
432 yield | |
432 yield problem.test_context_end | 433 yield problem.test_context_end |
433 for k, group in enumerate(prob.config.tests): | 434 for k, group in enumerate(prob.config.tests): |
434 if not group: | 435 if not group: |
435 continue | 436 continue |
436 yield problem.TestGroup(prob.config.groupweight.get(k, prob.config.groupweight.get(None))) | 437 yield problem.TestGroup(prob.config.groupweight.get(k, prob.config.groupweight.get(None))) |
447 for i in prob.config.tests: | 448 for i in prob.config.tests: |
448 s = str(i).zfill(prob.config.padtests) | 449 s = str(i).zfill(prob.config.padtests) |
449 prob.cache.padoutput = max(prob.cache.padoutput, len(s)) | 450 prob.cache.padoutput = max(prob.cache.padoutput, len(s)) |
450 for i in prob.config.dummies: | 451 for i in prob.config.dummies: |
451 s = str(i).zfill(prob.config.paddummies) | 452 s = str(i).zfill(prob.config.paddummies) |
452 yield _types[prob.config.kind](prob, s, True, 0) | 453 if (yield _types[prob.config.kind](prob, s, True, 0)): |
454 yield | |
453 for j, i in enumerate(prob.config.tests): | 455 for j, i in enumerate(prob.config.tests): |
454 s = str(i).zfill(prob.config.padtests) | 456 s = str(i).zfill(prob.config.padtests) |
455 yield _types[prob.config.kind](prob, s, False, getpoints(i, j)) | 457 if (yield _types[prob.config.kind](prob, s, False, getpoints(i, j))): |
458 yield |