def test_transform_input_sklearn_version():
    """Test that transform_input raises error with sklearn < 1.4."""
    X = np.array([[1, 2], [3, 4]])
    y = np.array([0, 1])
    msg = (
        "The `transform_input` parameter is not supported in scikit-learn versions "
        "prior to 1.4"
    )
    with pytest.raises(ValueError, match=msg):
        make_pipeline(DummyTransf(), transform_input=["blah"]).fit(X, y)
Test that transform_input raises error with sklearn < 1.4.
imblearn/tests/test_pipeline.py