exercism / exercism/python

[Pytest Tooling] Eliminate spurious Pytest warnings about unregistered marks

未关闭
#2,745 10 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug 🐛 on hold ✋🏽 smolder🍲
主要语言
Python
星标
2.5k
派生
1.5k
PR 合并指标
30 天内没有已合并 PR

描述

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](https://docs.pytest.org/en/latest/how-to/mark.html#registering-marks), 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?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。