Skip to content

--strict does not complain when non-existent markers are specified as args to pytest #2781

@geokala

Description

@geokala

I'm not seeing pytest complain in strict mode when filtering by markers that I haven't specified.
e.g. pytest --strict -m marker_that_i_tyoped_wrong mytests/
This will complete quite happily, deselecting all tests.

It would be nice if the behaviour were able to be changed, perhaps by another flag (to avoid causing sadness to anyone relying on the current behaviour), such that if the mark expression contained invalid marks it would cause a failure in the same way that a test containing invalid marks would.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: marksrelated to marks, either the general marks or builtintype: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions