Closed
Description
When an unknown mark is used, Pytest reports a PytestUnknownMarkWarning
. However, this is reported at the level of the warning call, which is obviously in pytest's code, which is unhelpful to users. This warning should be reported at the level of the user's code.
Example:
@pytest.mark.foo
def test_bar():
pass
$ pytest
...
========================================== warnings summary ===========================================
/home/stb-tester/.local/lib/python2.7/site-packages/_pytest/mark/structures.py:337
/home/stb-tester/.local/lib/python2.7/site-packages/_pytest/mark/structures.py:337: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
PytestUnknownMarkWarning,
-- Docs: https://docs.pytest.org/en/latest/warnings.html
...
- a detailed description of the bug or suggestion
- output of
pip list
from the virtual environment you are using - pytest and operating system versions
- minimal example if possible