Skip to content

Ugly message when using unregistered markers #3867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nicoddemus opened this issue Aug 23, 2018 · 0 comments
Closed

Ugly message when using unregistered markers #3867

nicoddemus opened this issue Aug 23, 2018 · 0 comments
Labels
topic: marks related to marks, either the general marks or builtin topic: reporting related to terminal output and user-facing messages and errors

Comments

@nicoddemus
Copy link
Member

When using --strict with unregistered marks the error message can be improved:

============================== ERRORS ===============================
_____________ ERROR collecting tests/test_wrong_mark.py _____________
tests\test_wrong_mark.py:4: in <module>
@pytest.mark.smoek
..\..\.env36\lib\site-packages\_pytest\mark\structures.py:311: in
__getattr__
self._check(name)
..\..\.env36\lib\site-packages\_pytest\mark\structures.py:327: in _check
raise AttributeError("%r not a registered marker" % (name,))
E AttributeError: 'smoek' not a registered marker
!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!
====================== 1 error in 0.09 seconds ======================
@nicoddemus nicoddemus added topic: reporting related to terminal output and user-facing messages and errors topic: marks related to marks, either the general marks or builtin labels Aug 23, 2018
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Oct 10, 2018
This prevents an enormous and often useless stack trace from showing
to end users.

Fix pytest-dev#3867
Fix pytest-dev#2293
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: marks related to marks, either the general marks or builtin topic: reporting related to terminal output and user-facing messages and errors
Projects
None yet
Development

No branches or pull requests

1 participant