Files
vscode-workbench/PLANNING/tools/test_ci_smoke.py
T

32 lines
804 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""I-02 本仓 CI 烟雾:调度器只读命令全过(list/status/collect)+ collect 解析出口 0。"""
import subprocess
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
def run(*args: str) -> subprocess.CompletedProcess:
return subprocess.run(
[sys.executable, "tasks.py", *args],
cwd=ROOT, capture_output=True, text=True, timeout=120,
)
def test_list_ok():
r = run("list")
assert r.returncode == 0, r.stderr
assert "总" in r.stdout or "C-01" in r.stdout
def test_status_ok():
r = run("status")
assert r.returncode == 0, r.stderr
assert "PLANNING 看板" in r.stdout
def test_collect_ok():
r = run("collect")
assert r.returncode == 0, r.stderr
assert "C-01" in r.stdout and "S-01" in r.stdout