fix: bind UI jobs and recovery actions to captured scope

This commit is contained in:
阿白叔 committed 2026-11-16 22:11:17 +08:00
1 parent 601dd7b6b2
commit cd7a5e0ca1
20 files changed
+1570 -297

No files matched your search

+3 -2
View File
@@ -69,9 +69,10 @@ def test_completed_old_library_result_does_not_release_new_library(qtbot, tmp_pa
qtbot.waitUntil(lambda: not window._icdb_active())
summary = window.icdb_summary
window.lmc_edit.setText('other.lmc')
message = window.status_label.text()
next(button for button in summary.buttons() if '释放' in button.text()).click()
assert getattr(window, 'release_dialog', None) is None
assert '切' in window.status_label.text()
assert window.status_label.text() == message
def test_later_management_invalidates_old_recovery_offer(qtbot, tmp_path, monkeypatch):
@@ -109,4 +110,4 @@ def test_check_release_action_tracks_busy_and_retained_queue(qtbot, tmp_path, mo
assert opened == [{'queued': True}]
window.busy = False
window._update()
assert action.isEnabled()
assert not action.isEnabled(), 'A dismissed one-shot result cannot be reactivated'