From 9d4e52105998e5154ab3aefe9b0ed8c5f2a20684 Mon Sep 17 00:00:00 2001 From: Maarten Sijm <9739541+mpsijm@users.noreply.github.com> Date: Wed, 21 Feb 2024 10:21:13 +0100 Subject: [PATCH] Partially revert "[problem] In validate_data, run validate_format tasks in parallel" This partially reverts commit 7d218566afb852b53f39589046f38d69b087321d. --- bin/problem.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/bin/problem.py b/bin/problem.py index 9c66b182..c22f98b6 100644 --- a/bin/problem.py +++ b/bin/problem.py @@ -681,10 +681,7 @@ def validate_data(problem, mode: validate.Mode, constraints: dict | bool | None # validate the testcases bar = ProgressBar(action, items=[t.name for t in testcases]) - - def process_testcase(testcase): - nonlocal success - + for testcase in testcases: bar.start(testcase.name) if ( @@ -696,13 +693,11 @@ def process_testcase(testcase): t2 = problem.matches_existing_testcase(testcase) if t2 is not None: bar.error(f'Duplicate testcase: identical to {t2.name}') - return + continue success &= testcase.validate_format(mode, bar=bar, constraints=constraints) bar.done() - parallel.run_tasks(process_testcase, testcases) - bar.finalize(print_done=True) # Make sure all constraints are satisfied.