add: multithreaded tests
This commit is contained in:
@@ -19,6 +19,8 @@ def _test(title: str, excutable: str, args: str, exit_code: int, log_path: str)
|
||||
|
||||
def test_parsing(excutable: str, tests_category: dict[str, list[dict[str, str]]], log_path: str):
|
||||
for category_name, tests in tests_category.items():
|
||||
print(category_name, end="\n" * 2)
|
||||
print(category_name)
|
||||
for test in tests:
|
||||
thread_manager.add_to_queu(_test, (test["title"], excutable, test['args'], test['exit'], f"{log_path}/{category_name}"))
|
||||
thread_manager.wait_pool()
|
||||
print("\n" * 1)
|
||||
@@ -9,3 +9,4 @@ def add_to_queu(func: callable, args: tuple):
|
||||
def wait_pool():
|
||||
global _pool
|
||||
_pool.shutdown(wait=True)
|
||||
_pool = concurrent.futures.ThreadPoolExecutor(max_workers=10)
|
||||
Reference in New Issue
Block a user