Skip to content

Commit bda63ca

Browse files
committed
Fix broken ranker tests. This is why we do PR's kids.
1 parent 7af91f1 commit bda63ca

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_ranking.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,19 +292,19 @@ def test_alert_count_ranking_contains_rank_column_on_dq_results(sample_missing_v
292292
def test_alert_count_ranks_by_sum_of_alerts_per_feature(sample_drift_result): # noqa: D103
293293
ranking = AlertCountRanker()
294294
sut = ranking.rank(sample_drift_result.filter(methods=['jensen_shannon']))
295-
assert sut.loc[sut['rank'] == 1, 'column_name'].values[0] == 'y_pred_proba'
296-
assert sut.loc[sut['rank'] == 2, 'column_name'].values[0] == 'wfh_prev_workday'
297-
assert sut.loc[sut['rank'] == 3, 'column_name'].values[0] == 'salary_range'
298-
assert sut.loc[sut['rank'] == 4, 'column_name'].values[0] == 'public_transportation_cost'
295+
assert sut.loc[sut['rank'] == 1, 'column_name'].values[0] == 'y_pred'
296+
assert sut.loc[sut['rank'] == 2, 'column_name'].values[0] == 'distance_from_office'
297+
assert sut.loc[sut['rank'] == 3, 'column_name'].values[0] == 'y_pred_proba'
298+
assert sut.loc[sut['rank'] == 4, 'column_name'].values[0] == 'wfh_prev_workday'
299299

300300

301301
def test_alert_count_ranking_should_exclude_zero_alert_features_when_exclude_option_set( # noqa: D103
302302
sample_drift_result,
303303
):
304304
ranking = AlertCountRanker()
305305
sut = ranking.rank(sample_drift_result.filter(methods=['jensen_shannon']), only_drifting=True)
306-
assert len(sut) == 5
307-
assert not any(sut['column_name'] == 'gas_price_per_litre')
306+
assert len(sut) == 7
307+
assert 'gas_price_per_litre' not in sut.columns
308308

309309

310310
def test_correlation_ranking_contains_rank_column(sample_drift_result, sample_realized_perf_result): # noqa: D103

0 commit comments

Comments
 (0)