Replies: 2 comments 3 replies
-
*edit * Also autouse=True tells pytest to always use a fixture, you need it off It's unclear what you are asking for but the posted code for implementation is so incomprehensibly incorrect that it's not clear what the intent is Pytest already reorder parameterized tests as to minimise setup /teardown of higher scopes, However in those cases the parameter comes in as attribute of the fixture sub request I believe what you want is already implemented in fixture scopes |
Beta Was this translation helpful? Give feedback.
-
A possible hack would be a pytest_generate_tests that adds a hack fixture parameterized with only the name |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I'm apologize for my bad English.
test_main.py
conftest.py
I expect that fixture parametrized_fixture wil call once for test_dummy_1 and for test_dummy_2.
But in reality that fixture call once for all module. Is the way to use fixture for every functions, but do not call then uses one function with different parameters?
Expected behavior
Reality
Information for reproducing
I push my code to my repo. Commit SHA cdb11e6560264702b7c6f64f14a199bd655a1e6b.
All the things
I tried to use
mark.parametrize
for passing parameters, and it worked great. But i saw that pytest concat all parametres ids. I can not use this in my case.Beta Was this translation helpful? Give feedback.
All reactions