New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytest.param() is not documented #2658

hynek opened this Issue Aug 5, 2017 · 7 comments


None yet
7 participants

hynek commented Aug 5, 2017

I’ve learned about pytest.param by accident and I’m still not sure what it’s for. It’s used offhand in some examples, but there’s neither any narrative docs nor does it appear in .

Pls fix. :)


This comment has been minimized.


nicoddemus commented Aug 6, 2017

Thanks @hynek!


This comment has been minimized.

Jdsleppy commented Oct 17, 2017

I'm afraid it doesn't do much and looks to only be a shorthand for another undocumented method:

I'm not very familiar with the pytest codebase, but it doesn't seem like it's built for external use.


This comment has been minimized.


The-Compiler commented Oct 17, 2017

It is intended for public use, to apply markers in pytest.mark.parametrize or set test IDs easily - i.e. something like pytest.param('foo', marks=pytest.mark.skipif(...)) (instead of the earlier confusing pytest.mark.skipif(...)('foo')), and pytest.param('foo', id='bar') (instead of having the ID in a list disconnected from the parameters).


This comment has been minimized.

rlaverde commented Oct 22, 2017

Hi, I just found a little example of it in the documentation (in the second code example of this parametrize section)

Should It be extended? Maybe a new section in the same doc page (parametrize)?


This comment has been minimized.


nicoddemus commented Oct 22, 2017

@rlaverde definitely, including a full specification of the parameters would be nice as well.


This comment has been minimized.


dawran6 commented Oct 28, 2017

Hi everyone! I'm a new contributor to Pytest. Based on the discussion above I submitted PR #2881 addressing this issue. Could you help me review the PR? Any suggestion is welcome. Thank you!

@dawran6 dawran6 referenced this issue Oct 28, 2017


Document pytest.param #2881

4 of 4 tasks complete

This comment has been minimized.


nicoddemus commented Nov 3, 2017

Closed by #2881

@nicoddemus nicoddemus closed this Nov 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment