-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
topic: marksrelated to marks, either the general marks or builtinrelated to marks, either the general marks or builtintype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch
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
Metadata
Metadata
Assignees
Labels
topic: marksrelated to marks, either the general marks or builtinrelated to marks, either the general marks or builtintype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch