'Check if base learner properly changes with learner on the input'

def test_input_learner(self):

    self.assertIsNotNone(self.widget.base_estimator, 'The    default    base    estimator    should    not    be    none')
    self.assertTrue(self.widget.base_estimator.supports_weights, 'The    default    base    estimator    should    support    weights')
    default_base_estimator_cls = self.widget.base_estimator
    self.send_signal(self.widget.Inputs.learner, RandomForestLearner())
    self.assertIsInstance(self.widget.base_estimator, RandomForestLearner, 'The    base    estimator    was    not    updated    when    valid    learner    on    input')
    self.send_signal(self.widget.Inputs.learner, None)
    self.assertIsInstance(self.widget.base_estimator, type(default_base_estimator_cls), 'The    base    estimator    was    not    reset    to    default    when    None    on    input')
