You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm implementing a parameterized unit testing class.
I would like to initialize an instance of the class under test with different set of parameters (so I use @parameterized_class), and the same time I would like to run a test-method of the test class with different set of parameters BUT I would like to use a certain intialization of the instance of the class, I will consider a subset of the possible set of parameters for the test-method. Let's make an example:
The initialization of the A's instance with paramenter a1 is used with the set of sets of parameters (a2, True), (b2, False);
The initialization of A's instance with parameter b1 is used with the set of paramenters (b2, False);
The initialization of A's instance with parameter c1 is used with the set of parameters (b2, False), (c2, True).
So, as you can see we are NOT testing, for each parameterized initialization, the test_less_than with all the possible set of parameters, but just some of them. In other words: both initializations run the same test_less_than function but with different sets of parameters.
I hope that I could explain my issue in a clear way, thank you in advance for your help!
P.s. if it is not possible, could anyway provide me an alternative way? :)
The text was updated successfully, but these errors were encountered:
Hello,
Unfortunately I did not manage to combine parameterized_class and parameterized.expend at that time and I did not try it again.
It would be amazing if this feature will be included in the package.
Hi all!
I'm implementing a parameterized unit testing class.
I would like to initialize an instance of the class under test with different set of parameters (so I use @parameterized_class), and the same time I would like to run a test-method of the test class with different set of parameters BUT I would like to use a certain intialization of the instance of the class, I will consider a subset of the possible set of parameters for the test-method. Let's make an example:
What I would like to see is the followings:
a1
is used with the set of sets of parameters(a2, True), (b2, False)
;b1
is used with the set of paramenters(b2, False)
;c1
is used with the set of parameters(b2, False), (c2, True)
.So, as you can see we are NOT testing, for each parameterized initialization, the test_less_than with all the possible set of parameters, but just some of them. In other words: both initializations run the same test_less_than function but with different sets of parameters.
I hope that I could explain my issue in a clear way, thank you in advance for your help!
P.s. if it is not possible, could anyway provide me an alternative way? :)
The text was updated successfully, but these errors were encountered: