def test_without_label_vector(self): o = NullObject() o.label_vector = None with self.assertRaises(TypeError): model.requires_label_vector(lambda x: None)(o)
def test_with_label_vector(self): o = NullObject() o.label_vector = "" self.assertIsNone(model.requires_label_vector(lambda x: None)(o))