def test_arithmetic_two_vals_fails(es): with pytest.raises(ValueError): Add(2, 2)
def __add__(self, other_feature_or_val): """Add other_feature_or_val""" from featuretools.primitives import Add return Add(self, other_feature_or_val)
def __radd__(self, other): from featuretools.primitives import Add return Add(other, self)
def test_arithmetic_two_vals_fails(es): error_text = "one of.*must be an instance,of PrimitiveBase or Variable" with pytest.raises(ValueError, match=error_text): Add(2, 2)