[pytest-dev] pass a collection of function arguments to Pytest at the command line

Floris Bruynooghe flub at devork.be
Wed Apr 8 00:17:49 CEST 2015


Hi,

On 2 April 2015 at 22:21, dpb dpb <dpb.mediamath at gmail.com> wrote:
>
> Is there a way to pass a collection of function arguments to Pytest at
the command line so as to take the place of parameters being passed by the
parametrize decorator?
>
> Sometimes one set of parameters, out of a large collection, causes tests
to fail but only intermittently. Without rewriting the tests I'd like to
pass just that set of parameters again from the command line.

This is not directly integrated with the normal parametrisation.  However
there is an example that achieves what you are asking for:
http://pytest.org/latest/parametrize.html#basic-pytest-generate-tests-example

Hope that helps.

Regards,
Floris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20150407/37c50865/attachment.html>


More information about the pytest-dev mailing list