tests: bound generator subprocesses
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user