fix: continue released verify batches and bound automation shutdown
This commit is contained in:
1 parent
477a5a46e3
commit
00db1cf5f2
23 files changed
+550
-115
No files matched your search
@@ -80,19 +80,20 @@ def test_restart_shows_unfinished_without_starting_worker(qtbot, tmp_path):
|
||||
assert 'Block' in window.output.toPlainText()
|
||||
|
||||
|
||||
def test_persistent_owner_blocker_prevents_native_load_and_offers_checked_release(qtbot, tmp_path, monkeypatch):
|
||||
def test_historical_record_does_not_prevent_catalog_load_and_offers_checked_release(qtbot, tmp_path, monkeypatch):
|
||||
import pytest
|
||||
import cbb_refresh_verify.library_lock as locks
|
||||
from cbb_refresh_verify.ui.main_window import MainWindow
|
||||
library = tmp_path/'library/lib.lmc'; library.parent.mkdir(); library.touch()
|
||||
locks.blocker_path(library).write_text('{}', encoding='utf-8')
|
||||
window = MainWindow(reader=lambda _: pytest.fail('unconfirmed owner reopened'), data_root=tmp_path/'data')
|
||||
reads = []
|
||||
window = MainWindow(reader=lambda path: (reads.append(path) or LibraryReadResult(())), data_root=tmp_path/'data')
|
||||
qtbot.addWidget(window)
|
||||
window.lmc_edit.setText(str(library)); window.load_library()
|
||||
qtbot.waitUntil(lambda: not window.busy)
|
||||
assert window.loaded_path is None
|
||||
assert window.loaded_path == str(library) and reads
|
||||
assert window.release_library_button.isEnabled()
|
||||
assert '释放检查' in window.status_label.text()
|
||||
assert locks.blocker_path(library).read_text() == '{}'
|
||||
calls = []
|
||||
monkeypatch.setattr(QMessageBox, 'question', lambda *a, **k: QMessageBox.Yes)
|
||||
monkeypatch.setattr(locks, 'release_retained_library', lambda *a:
|
||||
|
||||
Reference in new issue
Block a user