def test_condensed_nearest_neighbors_deprecation():
    """Check that we raise a FutureWarning when accessing the parameter `estimator_`."""
    cnn = CondensedNearestNeighbour(random_state=RND_SEED)
    cnn.fit_resample(X, Y)
    warn_msg = "`estimator_` attribute has been deprecated"
    with pytest.warns(FutureWarning, match=warn_msg):
        cnn.estimator_
Check that we raise a FutureWarning when accessing the parameter `estimator_`.
imblearn/under_sampling/_prototype_selection/tests/test_condensed_nearest_neighbour.py