コード例 #1
0
def test_hasher_set_params():
    """Test delayed input validation in fit (useful for grid search)."""
    hasher = FeatureHasher()
    hasher.set_params(n_features=np.inf)
    assert_raises(TypeError, hasher.fit)
コード例 #2
0
def test_hasher_set_params():
    # Test delayed input validation in fit (useful for grid search).
    hasher = FeatureHasher()
    hasher.set_params(n_features=np.inf)
    with pytest.raises(TypeError):
        hasher.fit()
コード例 #3
0
def test_hasher_set_params():
    """Test delayed input validation in fit (useful for grid search)."""
    hasher = FeatureHasher()
    hasher.set_params(n_features=np.inf)
    assert_raises(TypeError, hasher.fit)