exercism / exercism/python

[Pytest Tooling] Eliminate spurious Pytest warnings about unregistered marks

オープン
#2,745 コメント 10 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。