-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Support passing a matrix to parametrize #2171
Comments
A Cartesian product of the argument values is only generated when using multiple Sorry if it is obvious (I should have gone to bed by now), perhaps you can post an example to clarify what you mean? |
@nicoddemus Let me drum up a test and I'll get back to you. |
@tgoodlet sup on this one, can we close? |
@RonnyPfannschmidt i'm pretty sure i found a bug with this so if you don't mind can we keep it open until i re-examine? |
@tgoodlet gentle ping. 😁 |
@nicoddemus finally back and yes will try to take a look this week! |
Cool, let us know if you need help. 👍 |
@tgoodlet should we close this for now? We can re-open this later when you get the time, no worries. |
@nicoddemus yeah close it if it it helps with your checklists. |
This is just an idea.
parametrize()
accepts a list of N-tuples to it'sargvalues
argument. This in turn generates a set of tests from the Cartesian product of the paired tuple's elements.I propose that support is added to allow
argvalues
to be a matrix (the underlying data structures are up for debate) generated by the user.This optionally allows for a user to generate tests only for the pairs of data they are interested in instead of having to filter down from the set of all pairs in
pytest_modify_collectitems()
.Of course the requirement on
argvalues
is that it must be a MxN matrix whereargnames
is of length N.The text was updated successfully, but these errors were encountered: