pbls/requirements-test.txt
2026-09-22 21:50:13 +08:00

19 lines
1023 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# pbls 应用 —— 测试前置依赖(发现项 DISC.2)
#
# 为什么单列一份、不并进 requirements.txt:
# requirements.txt 是**运行时**依赖,会被 build.sh 装进生产/测试 venv 并随应用
# 部署;pytest 只在「跑测试」这一步需要,混进去等于把测试工具塞进生产镜像。
#
# 为什么必须显式声明:
# 测试机宿主 python3 未装 pytest,`python3 -m pytest` 直接
# `No module named pytest`;此前靠临时注入 PYTHONPATH=<workspace>/.pylibs 跑通
# (一次性手段,换机器/换角色即失效),test 角色据此会误判「用例失败/环境不可用」。
#
# 用法(build.sh 第 7b 步已自动执行):
# python3 -m pip install -r requirements-test.txt
# 或 bash scripts/build.sh # venv 内即有 pytest
# 或 cd modules/pbl_evidence && bash scripts/run_tests.sh # 模块自带引导
#
# 版本区间与各模块 pyproject [project.optional-dependencies].test 一致(>=7.0,<10)。
pytest>=7.0,<10