forked from Project-N-E-K-O/N.E.K.O
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpytest.ini
More file actions
26 lines (26 loc) · 1.73 KB
/
Copy pathpytest.ini
File metadata and controls
26 lines (26 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[pytest]
asyncio_mode = auto
asyncio_default_fixture_loop_scope = function
# pytest-randomly 打乱用例顺序来暴露用例间的顺序依赖,但这里把 seed 钉死:
# 日常 CI(unit-tests.yml / plugin-tests.yml)必须是确定性的,否则一次随机重排就能
# 让一个跟改动无关的 PR 变红——那正是要消除的噪声,不是要引入的。持续的随机压力由
# .github/workflows/random-order-tests.yml 定时跑随机 seed 提供,它不挡任何 PR。
#
# 注意:换掉这个数字 = 换一套顺序,可能顺带暴露新的顺序依赖,属于有意为之的动作。
# 另外用例集合本身变化(新增/删除用例)也会让洗牌结果变,所以"确定性"的含义是
# "同一个 commit 上可复现",不是"跨 commit 顺序不变"。
#
# 调试用逃生阀:`--randomly-dont-reorganize` 恢复文件内定义顺序,
# `--randomly-dont-reset-seed` 关掉每条用例重置 random.seed()。
# 不要用 `-p no:randomly`——插件被屏蔽后 addopts 里的 --randomly-seed 会变成
# 无法识别的参数,pytest 直接报错退出。
addopts = -p no:anyio --randomly-seed=20260731
norecursedirs = .* venv build dist node_modules .pytest_cache __pycache__ *.egg local_server .codex-* .codex-tmp .codex_pytest_tmp .codex_manual_checks pytest-cache-files-* tmp-pytest N.E.K.O
markers =
unit: mark a test as a unit test.
frontend: mark a test as a frontend test.
e2e: mark a test as an E2E test.
performance: opt-in performance benchmark tests (enable with RUN_PERF_TESTS=true env var).
plugin_unit: plugin unit tests.
plugin_integration: plugin integration tests using local in-process transports.
plugin_e2e: plugin end-to-end tests (requires browser + running UI server).