[Pytest Tooling] Eliminate spurious Pytest warnings about unregistered marks
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- testing-qa, tooling
调研方向
首先检查 Python 练习的测试布局,包括示例 dicts_test.py,以及 pytest 关于注册 marks 的文档。比较 pytest.ini 或 pyproject.toml 哪个适合每个练习。当测试套件不再针对 task mark 发出 PytestUnknownMarkWarning 时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
When running the test suites for a Python exercise in a local environment, Pytest generates a set of warnings because each of the tests is annotated (decorated) with @pytest.mark.task. Because task isn't registered, the Pytest output includes lines such as
dicts_test.py:50
/Users/xyz/Exercism/python/inventory-management/dicts_test.py:50: PytestUnknownMarkWarning: Unknown pytest.mark.task - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
@pytest.mark.task(taskno=4)
This output is noisy and of little value to the developer.
Would it be reasonable to add a pytest.ini or pyproject.toml file as described in the link above to each of the exercises?
- 主要语言
- Python
- 星标
- 2.5k
- 派生
- 1.5k
- 平均合并
- 25 分钟
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
exercism/python 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 1/5 1 小时以内 新手友好度 1/100
-
x:rep/massive
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/skills#1811 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
speaches-ai/speaches#678 ·
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
datalayer/mcp-compose#42 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
conda-forge/spacy-feedstock#177 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
UKGovernmentBEIS/inspect_evals#2523 ·