Skip to content

Ugly message when using unregistered markers #3867

@nicoddemus

Description

@nicoddemus

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: marksrelated to marks, either the general marks or builtintopic: reportingrelated to terminal output and user-facing messages and errors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions