feat(scraper): update scraper i/o for single test panel
This commit is contained in:
parent
24624f9826
commit
b2e1ea2c58
3 changed files with 108 additions and 39 deletions
|
|
@ -174,15 +174,15 @@ def main() -> None:
|
|||
print(json.dumps(result))
|
||||
sys.exit(1)
|
||||
|
||||
test_cases: list[dict[str, str]] = []
|
||||
test_list: list[dict[str, str]] = []
|
||||
for input_data, output_data in tests:
|
||||
test_cases.append({"input": input_data, "output": output_data})
|
||||
test_list.append({"input": input_data, "expected": output_data})
|
||||
|
||||
result = {
|
||||
"success": True,
|
||||
"problem_id": problem_id,
|
||||
"url": url,
|
||||
"test_cases": test_cases,
|
||||
"tests": test_list,
|
||||
}
|
||||
print(json.dumps(result))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue