test: verify release wording and cancelled item resubmission

This commit is contained in:
阿白叔 committed 2026-11-25 11:02:28 +08:00
1 parent 6a716052f4
commit 2e87627ef1
5 files changed
+11 -9

No files matched your search

+2 -1
View File
@@ -9,6 +9,7 @@ owned private desktop/PID, a resolved resource command and an exact PRJ.
from pathlib import Path
import ast
import json
import re
import pytest
@@ -57,7 +58,7 @@ def test_no_input_injection_or_desktop_switching_in_production_code():
# interactive compatibility mode; the default worker remains
# isolated and never reaches this branch.
continue
if api in text:
if re.search(r'\b' + re.escape(api) + r'\b', text):
offenders.append(f'{path.name}: {api}')
assert offenders == [], f'输入注入/桌面切换/菜单驱动 API 不得出现在生产代码: {offenders}'