Created
October 23, 2021 21:40
-
-
Save dashapetr/ceca329c381978da99b0205ebc9edf1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pytest.mark.parametrize("input_array, list_with_predictions", | |
[ | |
(np.array([1, 2, 3, 4]), [6.17, 6.71, 7.25, 7.79]), | |
(np.array([5, 10, 15, 20]), [8.33, 11.03, 13.73, 16.43]), | |
(np.array([12, 22, 23, 24]), [12.11, 17.51, 18.05, 18.59]), | |
]) | |
def test_make_prediction_on_unseen_data(input_array, list_with_predictions, regression): | |
predicted_array = regression.make_prediction_on_unseen_data(input_array) | |
predicted_list = [] | |
for a in range(len(predicted_array)): | |
predicted_list.append(round(predicted_array[a], 2)) | |
assert predicted_list == list_with_predictions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment