comparison upreckon/config.py @ 205:166a23999bf7

Added confvar okexitcodemask; changed the validator protocol Callable validators now return three-tuples (number granted, bool correct, str comment) instead of two-tuples (number granted, str comment). They are still allowed to return single numbers. Callable validators must now explicitly raise upreckon.exceptions.WrongAnswer if they want the verdict to be Wrong Answer rather than Partly Correct. okexitcodemask specifies a bitmask ANDed with the exit code of the external validator to get a boolean flag showing whether the answer is to be marked as 'OK' rather than 'partly correct'. The bits covered by the bitmask are reset to zeroes before devising the number of points granted from the resulting number.
author Oleg Oshmyan <chortos@inbox.lv>
date Wed, 17 Aug 2011 20:44:54 +0300
parents dd1f715398f0
children 946e8c09ba12
comparison
equal deleted inserted replaced
204:00c80bba7f13 205:166a23999bf7
35 'binary': False, 35 'binary': False,
36 'dummyinname': '', 36 'dummyinname': '',
37 'dummyoutname': '', 37 'dummyoutname': '',
38 'tester': None, 38 'tester': None,
39 'maxexitcode': 0, 39 'maxexitcode': 0,
40 'okexitcodeflag': 0,
40 'inname': '', 41 'inname': '',
41 'ansname': '', 42 'ansname': '',
42 'force_zero_exitcode': True} 43 'force_zero_exitcode': True}
43 defaults_global = {'problems': None} 44 defaults_global = {'problems': None}
44 defaults_noerase = {'inname': '%.in', 45 defaults_noerase = {'inname': '%.in',