'Allow test data with no class'

def test_no_class_on_test(self):

    error = self.widget.Error
    titanic = Table('titanic')
    majority_titanic = ConstantLearner()(titanic)
    majority_iris = ConstantLearner()(self.iris)
    no_class = Table(Domain(titanic.domain.attributes, None), titanic)
    self.send_signal(self.widget.Inputs.predictors, majority_titanic, 1)
    self.send_signal(self.widget.Inputs.data, no_class)
    out = self.get_output(self.widget.Outputs.predictions)
    np.testing.assert_allclose(out.get_column_view('constant')[0], 0)
    self.send_signal(self.widget.Inputs.predictors, majority_iris, 2)
    self.assertTrue(error.predictors_target_mismatch.is_shown())
    self.assertFalse(error.data_target_mismatch.is_shown())
    self.assertIsNone(self.get_output(self.widget.Outputs.predictions))
    self.send_signal(self.widget.Inputs.predictors, None, 2)
    self.send_signal(self.widget.Inputs.data, titanic)
    out = self.get_output(self.widget.Outputs.predictions)
    np.testing.assert_allclose(out.get_column_view('constant')[0], 0)
