fix: isolate ICDB checks and recover scoped native sessions
This commit is contained in:
1 parent
1acfbd6374
commit
1bd7589fef
82 files changed
+7770
-1583
No files matched your search
+12
-12
@@ -47,7 +47,7 @@ def test_global_icdb_action_confirms_and_excludes_ready_rows(qtbot, tmp_path, mo
|
||||
assert calls == []
|
||||
monkeypatch.setattr(QMessageBox, 'question', lambda *a, **k: QMessageBox.Yes)
|
||||
window.icdb_repair_button.click()
|
||||
qtbot.waitUntil(lambda: not window.busy)
|
||||
qtbot.waitUntil(lambda: not window._icdb_active())
|
||||
assert calls == ['PENDING']
|
||||
|
||||
def test_global_icdb_action_disabled_without_library_or_while_busy(qtbot):
|
||||
@@ -72,11 +72,11 @@ def test_global_icdb_failure_preserves_untargeted_ready_and_stops_queue(qtbot, t
|
||||
qtbot.waitUntil(lambda: not window.busy)
|
||||
monkeypatch.setattr(QMessageBox, 'question', lambda *a, **k: QMessageBox.Yes)
|
||||
window.icdb_repair_button.click()
|
||||
qtbot.waitUntil(lambda: not window.busy)
|
||||
qtbot.waitUntil(lambda: not window._icdb_active())
|
||||
assert calls == ['B']
|
||||
assert 'A' in window.ready_names
|
||||
assert window.cbb_table.item(1, 2).text() == '未知 / 需确认'
|
||||
assert window.cbb_table.item(2, 3).text().startswith('SKIPPED')
|
||||
assert window.cbb_table.item(2, 3).text() == '未检查'
|
||||
|
||||
def test_global_icdb_progress_and_check_summary(qtbot, tmp_path, monkeypatch):
|
||||
from PySide6.QtWidgets import QMessageBox
|
||||
@@ -92,7 +92,7 @@ def test_global_icdb_progress_and_check_summary(qtbot, tmp_path, monkeypatch):
|
||||
window.lmc_edit.setText('lib.lmc'); window.load_library()
|
||||
qtbot.waitUntil(lambda: not window.busy)
|
||||
window.icdb_repair_button.click()
|
||||
qtbot.waitUntil(lambda: not window.busy)
|
||||
qtbot.waitUntil(lambda: not window._icdb_active())
|
||||
assert 'lib.lmc' in confirmations[0]
|
||||
assert '非 READY' in confirmations[0]
|
||||
assert window.icdb_progress.value() == 1
|
||||
@@ -284,7 +284,7 @@ def test_unc_library_uses_mentor_path_for_read_and_verify_and_releases_on_close(
|
||||
assert calls == [lease.mentor_path]
|
||||
assert window._request('CBB1').lmc_file == lease.mentor_path
|
||||
window.close()
|
||||
assert lease.closed
|
||||
qtbot.waitUntil(lambda: lease.closed)
|
||||
|
||||
|
||||
def test_advanced_options_are_copied_to_verify_request(qtbot, tmp_path):
|
||||
@@ -353,12 +353,12 @@ def test_ui_default_timeout_matches_request_and_labels_inactivity(qtbot):
|
||||
assert window.timeout_spin.value() == 600
|
||||
assert window.timeout_spin.value() == VerifyRequest(Path('lib.lmc'), 'CBB1', Path('data')).timeout_seconds
|
||||
assert '无进展' in window.timeout_spin.suffix()
|
||||
|
||||
|
||||
def test_batch_summary_exposes_failures_only_report(qtbot, tmp_path):
|
||||
window = MainWindow(reader=fake_reader, data_root=tmp_path)
|
||||
qtbot.addWidget(window)
|
||||
report=tmp_path/'reports/batch-20260929-test.log'
|
||||
window._batch_done(([VerifyResult('FAIL',stderr='Mentor error')],report))
|
||||
|
||||
|
||||
def test_batch_summary_exposes_failures_only_report(qtbot, tmp_path):
|
||||
window = MainWindow(reader=fake_reader, data_root=tmp_path)
|
||||
qtbot.addWidget(window)
|
||||
report=tmp_path/'reports/batch-20260929-test.log'
|
||||
window._batch_done(([VerifyResult('FAIL',stderr='Mentor error')],report))
|
||||
assert '仅失败日志' in window.summary.detailedText()
|
||||
assert str(report.with_name('failures-20260929-test.log')) in window.summary.detailedText()
|
||||
Reference in new issue
Block a user