Files
ykcheungab 31f6ef3881 简化 Autocal 界面测试并减少等待开销
用轻量曲面和独立页面验证普通交互,收拢窗口清理,并让后台测试任务获得执行时间。保留原有 90 项用例,113 项相关测试及代码检查通过。
2026-10-15 21:17:28 +08:00

15 lines
458 B
Python

"""Bounded event-loop waits for recording review tests."""
import time
from PySide6.QtCore import QCoreApplication
def wait_review(widget):
deadline = time.monotonic() + 10
while widget._job is not None and time.monotonic() < deadline:
QCoreApplication.processEvents()
# Release the GIL so the Python recording worker can finish its I/O.
time.sleep(.001)
assert widget._job is None, "background review did not finish"