This is an extension of: Unit Testing Interfaces in Python
My problem is the number of classes that satisfy an interface will eventually run into the thousands. Different developers work on different sub classes.
We can't have a failing unit test for one subclass fail tests for other sub classes. Essentially, I need to create a new unittest.TestCase type for each subclass satisfying the interface.
It would be nice to be able to do this without having to modify the test module. (I'd like to avoid updating the unit test module every time a new subclass satisfying the interface is added).
I want to be able to create a unittest.TestCase class type automatically for a class satisfying interface. This can be done using meta classes.
But these classes need to be added to the test module for testing. Can this be done during class definition without requiring modifications to the test module?