diff --git a/problemtools/verifyproblem.py b/problemtools/verifyproblem.py index 02bb4a9b..ce6c0481 100644 --- a/problemtools/verifyproblem.py +++ b/problemtools/verifyproblem.py @@ -497,6 +497,9 @@ def check(self, args): if not f[:-4] + '.in' in infiles: self.error("No matching input file for answer '%s'" % f) + if not self.get_subgroups() and not self.get_testcases(): + self.error('Test case group is empty') + # Check whether a <= b according to a natural sorting where numeric components # are compactified, so that e.g. "a" < "a1" < "a2" < "a10" = "a010" < "a10a". def natural_sort_le(a, b): @@ -1320,6 +1323,10 @@ def grade(self, sub_results, testcasegroup, shadow_result=False): verdict = 'AC' score = 0 + if not sub_results: + self.info('No results on %s, so no graders ran' % (testcasegroup,)) + return (verdict, score) + grader_flags = testcasegroup.config['grader_flags'].split() self.debug('Grading %d results:\n%s' % (len(sub_results), grader_input)) self.debug('Grader flags: %s' % grader_flags) diff --git a/support/default_grader/default_grader b/support/default_grader/default_grader index 3da8247a..b0335cf7 100755 --- a/support/default_grader/default_grader +++ b/support/default_grader/default_grader @@ -68,4 +68,4 @@ try: score = aggregate_scores(scores) print('%s %f' % (verdict, score)) except: - print('JE') + print('JE 0')