Closed anudeepsamaiya closed 1 year ago
It would be possible (PR very welcome!) to update parameterized_class
to accept a callable, but unfortunately I'm not sure whether it would be possible to lazily evaluate that callable when the class under test is executed. Specifically, test runners typically collect all the tests to be run first, then execute them, and I'm not sure how this lazy evaluation would interact with that semantic.
Please feel free to re-open this issue if you can think of a way to make this work!
Is it possible to provide the attributes to
parametrize_class
decorators lazily, such that the test factory should run only when the particular test class is being executed?The
@parametrize
decorator supports taking afunction
as an argument, but@parametrized_class
decorator does not supportfunctions
orgenerators
.