def test_fit_transform(params):
    """Test that 'fit_transform' and 'fit' then 'transform' yield same res."""
    weasel_1 = WEASEL(**params, sparse=False)
    weasel_2 = WEASEL(**params, sparse=False)

    X_fit_transform = weasel_1.fit_transform(X, y)
    X_fit_then_transform = weasel_2.fit(X, y).transform(X)

    # Test that the transformation are identical
    np.testing.assert_allclose(X_fit_transform, X_fit_then_transform,
                               atol=1e-5, rtol=0.)

    # Test that the vocabulary_ attributes are identical
    assert weasel_1.vocabulary_ == weasel_2.vocabulary_
Test that 'fit_transform' and 'fit' then 'transform' yield same res.
pyts/transformation/tests/test_weasel.py