test: 隔离单测中的站点原生资源 (#6452)

* test: isolate native site resources

* refactor(test): retain sites stub helper contract

* fix(test): preserve sites stub probe imports

---------

Co-authored-by: jxxghp <jxxghp@gmail.com>
This commit is contained in:
InfinityPacer
2026-08-25 16:26:46 +08:00
committed by GitHub
co-authored by jxxghp
parent f3622de82e
commit c727d9c9f1
10 changed files with 31 additions and 49 deletions
+1 -1
View File
@@ -167,7 +167,7 @@ def test_manifest_aliases_reuse_real_canonical_modules():
code = """
import importlib
from app.runtime.compat.manifest import MODULE_ALIASES
# CI 无 app.application.site.sites 二进制模块,先补垫片再校验全部映射(与 conftest 同源)
# 独立探针不经过 pytest 引导,先隔离站点原生制品再校验兼容映射
from app.testing.bootstrap import ensure_sites_stub
ensure_sites_stub()