tests: bound generator subprocesses

This commit is contained in:
2026-08-14 02:50:58 +09:00
parent d7115c5eb5
commit 46c8ccd779
3 changed files with 17 additions and 6 deletions

View File

@@ -9,13 +9,16 @@ from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
MKEMOJI = ROOT / "map" / "mkemoji"
TIMEOUT = 10
def generate(source=None):
args = [sys.executable, "-B", str(MKEMOJI)]
if source is not None:
args.append(str(source))
return subprocess.run(args, capture_output=True, text=True, check=False)
return subprocess.run(
args, capture_output=True, text=True, check=False, timeout=TIMEOUT
)
def table(output):