The spelling of pytest.mark.parametrize is a constant source of confusion as it could just as well be parameterize, parameterise or parametrise.
How about using a short form that avoids the spelling confusion? As we already have params as keyword argument to paramet[e]ri[z|s]e fixtures, we could reuse that and have pytest.mark.params instead.
+1. Also pytest.mark.parametr<anything>(args) return a valid object,
>>> pytest.mark.parameterize_incorrect('x', [2, 3])
MarkDecorator(mark=Mark(name='parameterize_incorrect', args=('x', [2, 3]), kwargs={}))
which only adds to the confusion, in my experience.
i propose making "strict" the default and falling flat on unknown marks instead
I propose making "strict" the default and falling flat on unknown marks instead
This is definitely my preference, as "There should be one-- and preferably only one --obvious way to do it."
Yes. Strict marker checking by default would also remove a lot of footguns.
Closing this as solved (in a better way) by https://github.com/pytest-dev/pytest/issues/4826 - thanks @Zac-HD :)
I would argue that parametrize is a misspelling that it would still be nice to get fixed. We're dealing with function parameters not parametric curves. It's great to get a warning, but it would be nice to fix the common, constant source of confusion.
Most helpful comment
i propose making "strict" the default and falling flat on unknown marks instead