Pytest 4.5.0 now displays warning for non declared markers (Eventually errors)
See original GitHub issueWhen using allure, we are now seeing the following outputs with pytest 4.5.0 (These warnings are eventually going to become errors in pytest 4.6.0 (or some time similar)
some (but not all examples are):
PytestUnknownMarkWarning,_pytest/mark/structures.py:324: PytestUnknownMarkWarning: Unknown pytest.mark.allure_label.epic - 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,
pytest.mark.allure_label.feature - 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,
pytest.mark.allure_label.story - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.htmlPytestUnknownMarkWarning,
#5023: New flag --strict-markers that triggers an error when unknown markers (e.g. those not registered using the markers option in the configuration file) are used in the test suite.
The existing --strict option has the same behavior currently, but can be augmented in the future for additional checks.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:13 (2 by maintainers)
Top Results From Across the Web
How to capture warnings
By default pytest will display DeprecationWarning and PendingDeprecationWarning warnings from user code and third-party libraries, as recommended by PEP 565.
Read more >pytest Documentation
"markers", "env(name): mark test to run only on named environment". ) Registered marks appear in pytest's help text and do not emit warnings...
Read more >PytestUnknownMarkWarning: Unknown pytest.mark.xxx - is ...
To properly handle this you need to register the custom marker . Create a pytest.ini file and place the following inside of it....
Read more >Bug listing with status RESOLVED with resolution TEST- ...
UTF-8 uxterm Warning: locale not supported by Xlib, locale set to C" status:RESOLVED ... Bug:261923 - "x11-libs/qt-gui-4.5.0 build error" status:RESOLVED ...
Read more >Release 5.3.1 unknown
Coverage.py is a tool for measuring code coverage of Python programs. It monitors your program, noting which parts.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
will be fixed on next release
This is very annoying.