修复 Autocal 录像故障处理、复核回放与汇总统计
This commit is contained in:
@@ -147,3 +147,33 @@ def test_an_unclosed_trial_does_not_offer_the_video(qt_app, tmp_path):
|
||||
assert dialog.message.text()
|
||||
finally:
|
||||
dialog.close()
|
||||
|
||||
|
||||
def test_a_closed_aborted_trial_can_be_replayed_for_diagnosis(qt_app, tmp_path):
|
||||
import json
|
||||
|
||||
from orisys_autocal.ui.record_overview_dialog import RecordOverviewDialog
|
||||
from orisys_autocal.ui.session_review_dialog import SessionReviewDialog
|
||||
|
||||
root = multipoint_session(tmp_path / "rec", trial_status="incomplete")
|
||||
path = root / "session.json"
|
||||
manifest = json.loads(path.read_text(encoding="utf-8"))
|
||||
manifest["trials"][0].update(
|
||||
capture_status="incomplete", capture_report={"completed": True})
|
||||
path.write_text(json.dumps(manifest), encoding="utf-8")
|
||||
review = review_session(root)
|
||||
for kind in (SessionReviewDialog, RecordOverviewDialog):
|
||||
dialog = kind(root, review=review)
|
||||
opened = None
|
||||
try:
|
||||
if isinstance(dialog, RecordOverviewDialog):
|
||||
dialog.table.selectRow(0)
|
||||
opened = dialog._video()
|
||||
assert opened is not None
|
||||
wait_review(opened)
|
||||
assert opened.video is not None
|
||||
assert opened.image.pixmap() is not None
|
||||
finally:
|
||||
if opened is not None:
|
||||
opened.close()
|
||||
dialog.close()
|
||||
|
||||
Reference in New Issue
Block a user