[Pytest Tooling] Eliminate spurious Pytest warnings about unregistered marks
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- testing-qa, tooling
Research direction
Start by reviewing the Python exercise test layout, including the example dicts_test.py, and the pytest documentation on registering marks. Compare whether pytest.ini or pyproject.toml is appropriate for each exercise. Done means the test suites no longer emit PytestUnknownMarkWarning for the task mark.
Written by the indexing model from the issue text.
Description
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?
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from exercism/python
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 1/5 Under an hour Newbie friendliness 1/100
-
x:rep/massive
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Openarea: ci bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/clickhouse-connect#1057 ·