fix: address PCB access review in CLI and desktop

This commit was merged in pull request #20.
This commit is contained in:
阿白叔 committed 2026-11-23 12:10:30 +08:00
1 parent 2d6acc1180
commit 7c239e123b
11 files changed
+151 -16

No files matched your search

+6 -4
View File
@@ -60,11 +60,13 @@ def test_supervisor_acknowledged_failed_open_can_close_empty_shell_with_address(
@pytest.mark.parametrize('aliased', [False, True])
def test_late_release_is_rechecked_before_later_same_library_item(tmp_path, monkeypatch, aliased):
@pytest.mark.parametrize('first_status', ['FAIL', 'SKIPPED'])
def test_late_release_is_rechecked_before_later_same_library_item(tmp_path, monkeypatch, aliased, first_status):
library = tmp_path/'lib.lmc'
calls, checks = [], []
failed = verify_runner.VerifyResult('FAIL', stderr='bad database', safe_to_continue=False,
evidence_path=tmp_path/'result.json', error_category='MENTOR_DATABASE_LOAD_FAILED')
failed = verify_runner.VerifyResult(first_status, stderr='native operation declined', safe_to_continue=False,
evidence_path=tmp_path/'result.json',
error_category='PCB_OPEN_SKIPPED' if first_status == 'SKIPPED' else 'MENTOR_DATABASE_LOAD_FAILED')
def verify(request):
calls.append(request.block_name)
return failed if request.block_name == 'Bad' else verify_runner.VerifyResult('PASS')
@@ -78,7 +80,7 @@ def test_late_release_is_rechecked_before_later_same_library_item(tmp_path, monk
results = verify_runner.run_batch([verify_runner.VerifyRequest(library, n, tmp_path)
for n in ('Bad','Good')], verifier=verify)
assert calls == ['Bad','Good']
assert [r.status for r in results] == ['FAIL','PASS']
assert [r.status for r in results] == [first_status,'PASS']
assert results[0].safe_to_continue