Files
42_ft_ping/test/test.py
2025-12-17 06:08:52 -06:00

23 lines
583 B
Python

from collections.abc import Callable
import json
import sys
import os
import shutil
import thread_manager
import parsing
import execution
excutable: str = sys.argv[1]
with open('test/tests.json', 'r') as file:
tests: dict[str, dict] = json.load(file)
tester: dict[str, Callable[[str, dict], None]] = {"parsing": parsing.test_parsing, "excution": execution.test_excution}
shutil.rmtree("log")
for category_name, tests in tests.items():
print(category_name, end="\n" * 2)
tester[category_name](excutable, tests, f"log/{category_name}")
thread_manager.wait_pool()