[pytest-dev] how to handle 'parameterize' misspelling

Bruno Oliveira nicoddemus at gmail.com
Mon Mar 9 23:33:35 CET 2015


Hi Brianna,

Between the two options, I would go for option 2. I don't see much benefit
in an alias, as long as an early error warns the user about the mistake.

Wasn't there plans to eventually only allow users to use marks previously
declared, instead of generating them dynamically while accessing
`pytest.mark`?

Cheers,

On Mon, Mar 9, 2015 at 7:25 PM, Brianna Laugher <brianna.laugher at gmail.com>
wrote:

> Hello,
>
>
> https://bitbucket.org/pytest-dev/pytest/issue/463/add-alias-for-parametrize-or-provide
>
> It is, I think, a relatively common and easy error for someone to type
> 'pytest.mark.parameterize' instead of 'pytest.mark.parametrize'. At the
> moment doing so (wrongly putting an extra 'e') results in an error like*
> "fixture 'arg' not found" *which is not very revealing as to what the
> problem actually is.
>
> Two reasonable options would be
> 1) Treat parameterize as an alias of parametrize, so they behave
> identically
> 2) Check for the misspelling and raise a specific error about it
>
> What are people's thoughts about the best approach?
>
> cheers
> Brianna
>
>
> --
> They've just been waiting in a mountain for the right moment:
> http://modernthings.org/
>
> _______________________________________________
> pytest-dev mailing list
> pytest-dev at python.org
> https://mail.python.org/mailman/listinfo/pytest-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20150309/9667625d/attachment.html>


More information about the pytest-dev mailing list