How to make a “factory” to create dependent fixtures for multiple parametrizations?
I have a test setup wherein I have multiple parametrizations, and I have secondary tests that depend on primary tests for each parametrization. I have got the following dependency setup working (see my SO question here, although for this question I’m doing everything in one file for simplicity). However, now that I’m applying it, I’m running into the issue that I have to create two new fixtures for each parametrization, resulting in a lot of duplicated code.
How to make a “factory” to create dependent fixtures for multiple paramtrizations?
I have a test setup wherein I have multiple parametrizations, and I have secondary tests that depend on primary tests for each parametrization. I have got the following dependency setup working (see my SO question here, although for this question I’m doing everything in one file for simplicity). However, now that I’m applying it, I’m running into the issue that I have to create two new fixtures for each parametrization, resulting in a lot of duplicated code.
Pytest dependency doesn’t work when BOTH across files AND parametrized
I’m running into a problem wherein pytest_dependency works as expected when