Skip to content

Commit 57111e9

Browse files
committed
fix bug in test
1 parent f0c2aa0 commit 57111e9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/test_data/test_feature_validator.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,13 @@ def test_featurevalidator_get_columns_to_encode():
312312
for col in df.columns:
313313
df[col] = df[col].astype(col)
314314

315-
enc_columns, feature_types = validator._get_columns_to_encode(df)
315+
validator.fit(df)
316316

317-
assert enc_columns == ['category', 'bool']
318-
assert feature_types == ['numerical', 'numerical', 'categorical', 'categorical']
317+
categorical_columns, numerical_columns, feat_type = validator._get_columns_info(df)
318+
319+
assert numerical_columns == ['int', 'float']
320+
assert categorical_columns == ['category', 'bool']
321+
assert feat_type == ['numerical', 'numerical', 'categorical', 'categorical']
319322

320323

321324
def feature_validator_remove_nan_catcolumns(df_train: pd.DataFrame, df_test: pd.DataFrame,

0 commit comments

Comments
 (0)