def test_returns_zero_as_lower_bound(self): model.predict.return_value = [-23.4324] engine = RegressionPredictor(model) inference = engine.predict([vals])[0] assert inference == 0, 'Inference lower bound should be zero'
def test_return_specified_decimal_points(self): engine = RegressionPredictor(model) inference = engine.predict([vals], decimals=4)[0] assert number_of_decimals(inference) == 4, 'number of decimal points \
def test_returns_prediction(self): engine = RegressionPredictor(model) inference = engine.predict([vals])[0] assert inference == 23.43, 'Prediction value is incorrect'
def test_return_two_decimal_points(self): engine = RegressionPredictor(model) inference = engine.predict([vals])[0] assert number_of_decimals(inference) == 2, 'default number of decimal \
def test_return_float(self): engine = RegressionPredictor(model) inference = engine.predict([vals])[0] assert type(inference) == float, 'Inferences should be real numbers'