From e39a8700ac34450a869558d64ac5babd2599e36d Mon Sep 17 00:00:00 2001 From: Maarten Sijm <9739541+mpsijm@users.noreply.github.com> Date: Fri, 16 Feb 2024 16:50:10 +0100 Subject: [PATCH] [zip] Fix test case validation --- bin/problem.py | 3 ++- bin/tools.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/problem.py b/bin/problem.py index 75d032db..bc6063ba 100644 --- a/bin/problem.py +++ b/bin/problem.py @@ -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 diff --git a/bin/tools.py b/bin/tools.py index b251575d..17de3b2e 100755 --- a/bin/tools.py +++ b/bin/tools.py @@ -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.