def test_lc_fit_fits_regressor_with_txt_features(calibrator, X, mocker):
    y = [3, 5]
    txt_features = mk_text_features().fit(X)
    X_transformed = txt_features.transform(X)
    spy = mocker.spy(calibrator.regressor, 'fit')
    calibrator.fit(X, y)
    spy.assert_called_once()
    assert (spy.call_args[0][0].toarray() == X_transformed.toarray()).all()
    assert (spy.call_args[0][1] == y)
def test_lc_fit_fits_regressor_with_txt_features(calibrator, X, mocker):
    y = [3, 5]
    txt_features = mk_text_features().fit(X)
    X_transformed = txt_features.transform(X)
    spy = mocker.spy(calibrator.regressor, 'fit')
    calibrator.fit(X, y)
    spy.assert_called_once()
    assert (spy.call_args[0][0].toarray() == X_transformed.toarray()).all()
    assert (spy.call_args[0][1] == y)