Right now, we need to combinatorially make tests for each combination of model choices (e.g. DistortionModel and NoiseModel). It would be preferable to instead make a single test interface that takes these choices as arguments. This might be complicated. The pseudo code would look something like
class ModelChassis(OtherSuperclass):
@classmethod
def setUpClass(cls):
super(OtherSuperClass, cls).setUpClass()
def __init__(self, noise_model, distortion_model, noise_args, distortion_args):
# Set up members
def foo_test(self, *args, **kwargs):
# do absl testing of specific members
class AllModelTests(SuperClass):
@classmethod
def setUpClass(cls):
super(SuperClass, cls).setUpClass()
cls.homoscedastic_isotropic_model_tests = ModelChassis(
HomoscedasticNoise, IsotropicDistortion, [additional_arguments]
)
cls.heteroscedastic_isotropic_model_tests = ModelChassis(
HeteroscedasticNoise, IsotropicDistortion, [additional_arguments]
)
cls.homoscedastic_anisotropic_model_tests = ModelChassis(
HomoscedasticNoise, AnisotropicDistortion, [additional_arguments]
)
cls.heteroscedastic_anisotropic_model_tests = ModelChassis(
HeteroscedasticNoise, AnisotropicDistortion, [additional_arguments]
)
def foo_test(self, *args, **kwargs):
self.homoscedastic_isotropic_model_tests.foo_test(*args, **kwargs)
self.heteroscedastic_isotropic_model_tests.foo_test(*args, **kwargs)
self.homoscedastic_anisotropic_model_tests.foo_test(*args, **kwargs)
self.heteroscedastic_anisotropic_model_tests.foo_test(*args, **kwargs)
...
We might be able to figure out a single, implementation-independent chassis for doing this for all backend tests, but that also might not be possible due to the differences between the implementations.
Right now, we need to combinatorially make tests for each combination of model choices (e.g.
DistortionModel
andNoiseModel
). It would be preferable to instead make a single test interface that takes these choices as arguments. This might be complicated. The pseudo code would look something likeWe might be able to figure out a single, implementation-independent chassis for doing this for all backend tests, but that also might not be possible due to the differences between the implementations.