'In case the classification and regression learners require different
parameters, the fitter should be able to determine which ones have to
be passed where'

def test_constructs_learners_with_appropriate_parameters(self):

    class DummyClassificationLearner(LearnerClassification, ):
        def __init__(self, classification_param=1, **_):
            super().__init__()
            self.param = classification_param
    class DummyRegressionLearner(LearnerRegression, ):
        def __init__(self, regression_param=2, **_):
            super().__init__()
            self.param = regression_param
    class DummyFitter(Fitter, ):
        __fits__ = {'classification': DummyClassificationLearner, 'regression': DummyRegressionLearner}
    DummyClassificationLearner.fit = Mock()
    DummyRegressionLearner.fit = Mock()
    fitter = DummyFitter()
    self.assertEqual(fitter.get_learner(Fitter.CLASSIFICATION).param, 1)
    self.assertEqual(fitter.get_learner(Fitter.REGRESSION).param, 2)
    try:
        fitter = DummyFitter(classification_param=10, regression_param=20)
        self.assertEqual(fitter.get_learner(Fitter.CLASSIFICATION).param, 10)
        self.assertEqual(fitter.get_learner(Fitter.REGRESSION).param, 20)
    except TypeError:
        self.fail('Fitter    did    not    properly    distribute    params    to    learners')
