-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
One of the most common problems I see, and help debug, is typos in @pytest.mark.whatever decorators. Just recently we've had #4639 and #4814, and I've read three sets of unrelated docs in the last week that explicitly point out the spelling of mark.parametrize (not parameterize!).
The --strict argument helps, but is clearly insufficient by default. On the other hand, it can't be an error until a major version bump.
Happily, there is a standard middle ground: warnings! I therefore propose to emit a warning every time an unknown name is used as an attribute of pytest.mark. The message should include how to register the mark, why unregistered marks are problematic, and note that this warning may become an error in a future version of pytest.
Unless there are major objections to this plan, I'll try for an implementation over the weekend.