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)
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()