fix: permit fresh confirmed recovery after scoped release proof

This commit is contained in:
阿白叔 committed 2026-11-17 01:38:35 +08:00
1 parent 87e10740f7
commit 7c27f9604e
6 files changed
+106 -6

No files matched your search

+20
View File
@@ -47,3 +47,23 @@ def test_management_preview_reports_mismatch_and_allows_rechoose(qtbot,tmp_path,
dialog.table.item(0,2).setText(str(right))
dialog.execute_button.click()
assert len(questions)==1 and not dialog.busy
def test_source_name_preview_does_not_resolve_files_on_gui_thread(qtbot,tmp_path,monkeypatch):
from pathlib import Path
from PySide6.QtWidgets import QMessageBox
from cbb_refresh_verify.ui.management_dialog import ManagementDialog
from cbb_refresh_verify.ui import timed_prompt
source=project(tmp_path/'source','Block')
request=ManagementRequest('update',tmp_path/'library.lmc','Block',source=source)
dialog=ManagementDialog([request],adapter=NativeManagementAdapter())
qtbot.addWidget(dialog);dialog.show()
original=Path.resolve
def resolve(path,*args,**kw):
assert path!=source,'GUI preview touched potentially stalled source metadata'
return original(path,*args,**kw)
monkeypatch.setattr(Path,'resolve',resolve)
questions=[]
monkeypatch.setattr(timed_prompt,'question',lambda *a,**k:questions.append(a) or QMessageBox.No)
dialog._execute()
assert len(questions)==1