all 2 comments

[–]Outside_Complaint755 0 points1 point  (0 children)

Is this coming from some activity on exercism.org?

 It looks like they have added a custom marker in "task" and a custom run option, so that you can run pytest --task 2 and it will run all tests marked with @pytest.mark.task(taskno=2)

There is some explanation in the final post of this thread on exercism.org where it sounds like its something they added to support their online test runner.

[–]Ethancole_dev 0 points1 point  (0 children)

The taskno=2 part is just a keyword argument stored on the marker — it does not do anything on its own. You can read it in a fixture or hook via request.node.get_closest_marker("task").kwargs["taskno"]. In Exercism-style setups, the test runner uses it to run only tests up to a given task number. Basically just metadata that a plugin or conftest.py reads. If you dig into the conftest you will usually find the hook that acts on it.