test: 测试套件自隔离与全量离线化(collection 清零 + 杜绝真实网络) (#5873)

This commit is contained in:
InfinityPacer
2026-06-02 12:23:08 +08:00
committed by GitHub
parent 1c41d9f253
commit 437baec620
85 changed files with 14588 additions and 1163 deletions

8
app/testing/__init__.py Normal file
View File

@@ -0,0 +1,8 @@
"""测试辅助工具(主程序与插件仓共享)。
提供测试期对 ``sys.modules`` 的临时打桩能力,保证打桩在使用后还原,避免测试间
因残留假模块而相互污染。仅供测试使用,不参与运行时逻辑。
"""
from app.testing.stub import stub_modules
__all__ = ["stub_modules"]