pytest.ini wins even when it's empty, and `.pytest.ini` is never read
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 84/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python, typescript
调研方向
先阅读 readPytestSettings 和 PROJECT_FILES,然后查找 CONTRIBUTING.md 中描述的合成 fixture 测试。添加一个 fixture,用于验证空的 pytest.ini 优先于 pyproject.toml;再添加一个 fixture,用于验证 .pytest.ini 配置 python_files;运行 npm test。两个用例都通过,并且仅凭 .pytest.ini 就能检测为 Python 项目时,即为完成。
由索引模型根据 Issue 内容生成。
描述
pytest's rule: pytest.ini "will always match and take precedence … even if empty", and it matches even without a [pytest] section. The hidden .pytest.ini works the same way. Only pyproject.toml, tox.ini and setup.cfg need their section to match. The first match wins, and options are never merged.
readPytestSettings skips any file without the section (if (!section) continue;) and never looks at .pytest.ini. So:
- With a
pytest.inithat has only a comment, plus apyproject.tomlthat setspython_files = ["check_*.py"], DiffCI usescheck_*.py. pytest uses its defaults,test_*.pyand*_test.py. DiffCI then doesn't seetest_x.pyas a test. - With only a
.pytest.inithat setspython_files = check_*.py, DiffCI uses the defaults and doesn't seecheck_x.pyas a test.
Done when:
- The search order is
pytest.ini,.pytest.ini, thenpyproject.toml,tox.iniandsetup.cfg. - An existing
pytest.inior.pytest.inistops the search, even without a[pytest]section. pytest's defaults apply when it has no section. .pytest.iniis added toPROJECT_FILES, so a repository whose only pytest file is.pytest.iniis detected as a Python project.- There is a test for each of the two cases above.
New to DiffCI? See CONTRIBUTING.md: add a synthetic fixture, run npm test, and sign off commits with git commit -s. Comment here to claim the issue.
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 4
- 平均合并
- 18 小时 41 分钟
- 30 天内合并 PR
- 48
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DiffCI/core 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Planner: splitParts regex is quadratic on a quote followed by many backticks, so the fuzz test fails at random可能已有人在做 @FredApps 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
Agent tools: changed_files lists only the new path of a renamed file可能已有人在做 @FredApps 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
adapter good first issue
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
相似的 Issue
-
agent-ready area: ui-server priority: p3 type: test
难度 2/5 1-3 小时 新手友好度 78/100
schlessera/brain-kit#4249 ·
维护者通常 1 天内回复
-
documentation tool triaged
难度 2/5 1-3 小时 新手友好度 73/100
can1357/oh-my-pi#19608 · 2 条评论 ·
维护者通常 1 天内回复
-
dependencies tech-debt
难度 2/5 1-3 小时 新手友好度 65/100
bcgov/nr-waste-plus#1549 ·
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 78/100
blixvip/solana-token-meta#17 ·
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 78/100
blixvip/solana-tx-parse#18 ·