question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pytest 4.5.0 now displays warning for non declared markers (Eventually errors)

See original GitHub issue

When 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.

https://docs.pytest.org/en/latest/changelog.html

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
sseliverstovcommented, Jun 26, 2019

will be fixed on next release

5reactions
jurisbucommented, Jun 25, 2019

This is very annoying.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found