Prepare 2.0.0 release candidate

This commit is contained in:
ausboss
2026-09-07 19:56:23 -05:00
parent 528a864657
commit 699208dadc
171 changed files with 29044 additions and 4080 deletions
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env python3
"""Run backend test files in fresh processes with the active interpreter.
Several offline tests install small ComfyUI stubs in sys.modules. Isolating
files prevents one test's fake runtime from changing another test's imports.
"""
from pathlib import Path
import os
import subprocess
import sys
def main():
root = Path(__file__).resolve().parent.parent
paths = [root / name for name in sys.argv[1:]] or sorted((root / "tests").glob("test_*.py"))
env = {**os.environ, "OMP_NUM_THREADS": "2", "MKL_NUM_THREADS": "2", "PYTHONDONTWRITEBYTECODE": "1"}
failed = []
for path in paths:
print(f"\n--- {path.name} ---", flush=True)
try:
result = subprocess.run([sys.executable, str(path)], cwd=root, env=env, timeout=180)
if result.returncode:
failed.append(path.name)
except subprocess.TimeoutExpired:
print("Timed out after 180 seconds.", flush=True)
failed.append(path.name)
print(f"\n{len(paths) - len(failed)}/{len(paths)} test files passed.", flush=True)
if failed:
print("Failed: " + ", ".join(failed), flush=True)
return bool(failed)
if __name__ == "__main__":
sys.exit(main())