add: python tester

This commit is contained in:
2025-12-17 04:06:01 -06:00
parent d977022554
commit fd69df92f2
9 changed files with 129 additions and 3 deletions

24
test/test.py Normal file
View File

@@ -0,0 +1,24 @@
from collections.abc import Callable
import json
import sys
import os
import shutil
import thread_manager
import parsing
import exectution
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": exectution.test_excution}
shutil.rmtree("log")
for category_name, tests in tests.items():
print(category_name, end="\n" * 3)
tester[category_name](excutable, tests, f"log/{category_name}")
thread_manager.wait_pool()