Replies: 2 comments 1 reply
-
I fail to see how this makes anything more clear or simpler to be honest. I can see some value with parametrizing a test with dataclasses or named tuples for more complex parametrization, but I think there is a lot of value in having separate arguments for separate values. |
Beta Was this translation helpful? Give feedback.
0 replies
-
When a fixture has 20 parameters, and you have a class that passes each of those parameters to multiple tests, that’s a lot of parameter name duplication. Having the documentation show possible options gives the developer ideas about what style suits their implementation the best. AdamOn Sep 4, 2025, at 8:07 AM, Florian Bruhin ***@***.***> wrote:
I fail to see how this makes anything more clear or simpler to be honest. I can see some value with parametrizing a test with dataclasses or named tuples for more complex parametrization, but I think there is a lot of value in having separate arguments for separate values.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi -
I'd like to suggest an enhancement to the parametrization documentation to make it easier for people to grasp concepts easier.
The current documentation names each parameter as fixtures when calling the test. When there are several parameters to pass, this becomes cumbersome & repetitive (especially when there's multiple tests). Luckily, you guys have been smart enough to make it possible to pass dictionaries as test data. This example provides passing a list of dictionaries as parameters.
I think this suggestion will also help people make cleaner code.
Thanks for your consideration!
Notes:
Questions/comments welcome.
conftest.py:
test_user.py:
Beta Was this translation helpful? Give feedback.
All reactions