Skip to content

Commit 4b6cb57

Browse files
committed
added first test of the load_data function
1 parent b520042 commit 4b6cb57

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

tests/test_load_data.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import numpy as np
2+
import pandas as pd
3+
4+
from moddata import load_data
5+
6+
7+
def test_load_data_bankchurn():
8+
data: pd.DataFrame = load_data(dataset="bankchurn")
9+
assert data.shape == (10_000, 12)
10+
assert set(data.columns) == {
11+
'customer_id', 'credit_score', 'country', 'gender', 'age', 'tenure',
12+
'balance', 'products_number', 'credit_card', 'active_member',
13+
'estimated_salary', 'churn'
14+
}
15+
assert data.at[17, "credit_card"] == np.int64(1)
16+
17+

0 commit comments

Comments
 (0)