Suppose that I have the following unit test class:
class Test(unittest.TestCase)
def setUp(self) -> None:
self.test_parameter1 = 'A'
self.test_parameter2 = 'B'
@parametrized.expand([('A',), ('B',)])
def test_function1(self, test_param):
* Do tests here *
Is there a way how can I use self.test_parameter1
and self.test_parameter2
in parameterized.expand
instead of the literals A
and B
? Imagine A
and B
are large dicts, the tests would be very messy in this case if two large dicts are given to parametrized_expand
.