docs(agents): 修正冒烟测试命令,Windows 上 stdlib test 包遮蔽本地 test 目录
This commit is contained in:
parent
a136e818d7
commit
32633f7eec
@ -131,15 +131,17 @@
|
|||||||
## 3) 测试现状(不要再写过时命令)
|
## 3) 测试现状(不要再写过时命令)
|
||||||
|
|
||||||
- 当前仓库内可见自动化冒烟:`test/test_server_refactor_smoke.py`(`unittest`)
|
- 当前仓库内可见自动化冒烟:`test/test_server_refactor_smoke.py`(`unittest`)
|
||||||
- 运行方式:`python -m unittest test.test_server_refactor_smoke`
|
- 运行方式:`python -m pytest test/test_server_refactor_smoke.py -q`
|
||||||
|
- 注意(2026-08-01 实测):`python -m unittest test.test_server_refactor_smoke` 在标准 Windows Python 上失败——stdlib 自带常规包 `test` 遮蔽本地 `test/` 目录(无 `__init__.py` 的命名空间包优先级更低),报 `No module named 'test.test_server_refactor_smoke'`。无 pytest 时可用:
|
||||||
|
`python -c "import sys; sys.path.insert(0, '.'); import unittest; suite = unittest.TestLoader().discover('test', pattern='test_server_refactor_smoke.py'); r = unittest.TextTestRunner().run(suite); sys.exit(0 if r.wasSuccessful() else 1)"`
|
||||||
- `test_system_message.py` 依赖外部 `MOONSHOT_API_KEY` 与网络,不属于离线稳定 CI 用例。
|
- `test_system_message.py` 依赖外部 `MOONSHOT_API_KEY` 与网络,不属于离线稳定 CI 用例。
|
||||||
- 当前仓库未发现 `pytest.ini`/`pyproject.toml`/`tox.ini`;不要默认要求 `pytest` 作为唯一入口。
|
- 当前仓库未发现 `pytest.ini`/`pyproject.toml`/`tox.ini`;不要默认要求 `pytest` 作为唯一入口(仅作为冒烟测试的便捷运行器)。
|
||||||
- CLI 当前最小可复现验证:
|
- CLI 当前最小可复现验证:
|
||||||
- `npm --prefix cli run typecheck`
|
- `npm --prefix cli run typecheck`
|
||||||
- `npm --prefix cli run build`
|
- `npm --prefix cli run build`
|
||||||
- 若改动 `server/chat/`、`server/status/`、`server/tasks/` 等后端接口适配,补充:
|
- 若改动 `server/chat/`、`server/status/`、`server/tasks/` 等后端接口适配,补充:
|
||||||
- `python3 -m py_compile server/chat/*.py server/status/*.py server/tasks/*.py`
|
- `python3 -m py_compile server/chat/*.py server/status/*.py server/tasks/*.py`
|
||||||
- `python -m unittest test.test_server_refactor_smoke`
|
- `python -m pytest test/test_server_refactor_smoke.py -q`
|
||||||
|
|
||||||
## 4) 代码修改约定(实用版)
|
## 4) 代码修改约定(实用版)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user