diff --git a/bin/generate.py b/bin/generate.py index ef3e56fd..2179b125 100644 --- a/bin/generate.py +++ b/bin/generate.py @@ -845,7 +845,7 @@ def add_testdata_to_cache(): if not generator_up_to_date: # Generate .ans and .interaction if needed. - if not config.args.no_solution and testcase.root not in ["invalid_inputs", "invalid_outputs"]: + if not config.args.no_solution and testcase.root not in ["invalid_inputs", "invalid_answers"]: if not problem.interactive: # Generate a .ans if not already generated by earlier steps. if not testcase.ans_path.is_file(): @@ -1290,7 +1290,7 @@ def parse(key, name, yaml, parent, listed=True): nonlocal testcase_id # Skip unlisted `data/bad` directory: we should not generate .ans files there. if ( - name in ['bad', 'invalid_inputs', 'invalid_outputs'] + name in ['bad', 'invalid_inputs', 'invalid_answers'] and parent.path == Path('.') and listed is False ): diff --git a/bin/problem.py b/bin/problem.py index b7755a5b..69b4b7f1 100644 --- a/bin/problem.py +++ b/bin/problem.py @@ -577,7 +577,7 @@ def validate_data(problem, mode:validate.Mode, constraints: dict|bool|None=None) Arguments: mode: validate.Mode.INPUT | validate.Mode.ANSWER | (not implemented) Validate.Mode.OUTPUT constraints: True | dict | None. True means "do check constraints but discard the result." - False: TODO is this ever used? + False: TODO is this ever used? Return: True if all validation was successful. Successful validation includes, e.g., correctly rejecting invalid inputs.