Skip to content

Commit

Permalink
Partially revert "[problem] In validate_data, run validate_format tas…
Browse files Browse the repository at this point in the history
…ks in parallel"

This partially reverts commit 7d21856.
  • Loading branch information
mpsijm committed Feb 21, 2024
1 parent 1a5dd95 commit 9d4e521
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions bin/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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.
Expand Down

0 comments on commit 9d4e521

Please sign in to comment.