Skip to content

Commit

Permalink
Update test_dummy_model.py
Browse files Browse the repository at this point in the history
Agrega prueba unitaria para funcion get_target_max
  • Loading branch information
gmoivan authored Jan 31, 2025
1 parent dd9428c commit ada42fd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_dummy_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
add_mean_as_target,
drop_all_but_id,
get_target_mean,
get_target_max,
read_testing_dataset,
read_training_dataset,
write_submission,
Expand All @@ -27,6 +28,15 @@ def test_get_target_mean():
assert expected_mean == obtained_mean


# Obten el maximo de target
def test_get_target_max():
data = {"id": [1, 2], "target": [3, 4]}
dataset = pd.DataFrame(data=data)
obtained_max = get_target_max(dataset)
expected_max = 4
assert expected_max == obtained_max


# Lee test.csv
def test_read_testing_dataset():
testing_dataset = read_testing_dataset()
Expand Down

0 comments on commit ada42fd

Please sign in to comment.