简化 Autocal 界面测试并减少等待开销
用轻量曲面和独立页面验证普通交互,收拢窗口清理,并让后台测试任务获得执行时间。保留原有 90 项用例,113 项相关测试及代码检查通过。
This commit is contained in:
@@ -2,11 +2,13 @@
|
||||
|
||||
import time
|
||||
|
||||
from PySide6.QtTest import QTest
|
||||
from PySide6.QtCore import QCoreApplication
|
||||
|
||||
|
||||
def wait_review(widget):
|
||||
deadline = time.monotonic() + 10
|
||||
while widget._job is not None and time.monotonic() < deadline:
|
||||
QTest.qWait(10)
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user