Skip to content

Commit

Permalink
[zip] Fix test case validation
Browse files Browse the repository at this point in the history
  • Loading branch information
mpsijm committed Feb 16, 2024
1 parent 7fc7b44 commit e39a870
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bin/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,13 +699,14 @@ def process_testcase(testcase):
loc = Path(loc).name
name, has_low, has_high, vmin, vmax, low, high = value
if not has_low:
success = False
warn(
f'BOUND NOT REACHED: `{name}` never equals lower bound {low}. Min value found: {vmin}'
)
if not has_high:
success = False
warn(
f'BOUND NOT REACHED: `{name}` never equals upper bound {high}. Max value found: {vmax}'
)
success = False

return success
4 changes: 2 additions & 2 deletions bin/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,8 +955,8 @@ def run_parsed_arguments(args):
statement_language = None

if not config.args.force:
success &= problem.validate_format('input', constraints={})
success &= problem.validate_format('answer', constraints={})
success &= problem.validate_data(validate.Mode.INPUT, constraints={})
success &= problem.validate_data(validate.Mode.ANSWER, constraints={})

# Write to problemname.zip, where we strip all non-alphanumeric from the
# problem directory name.
Expand Down

0 comments on commit e39a870

Please sign in to comment.