@@ -180,34 +180,34 @@ def test_get_feature_names_out_redundent():
180180
181181
182182# @pytest.mark.parametrize("px", MODULES)
183- @pytest .mark .parametrize (
184- "missing" ,
185- ["zero_impute" , "error" , "aaa" ],
186- )
187- def test_missing_values (missing : str ):
188- """Test what happens when missing values are in the data"""
189- observations = [
190- ["alice" , "bob" ],
191- [pd .NA , "alice" ],
192- ["bob" , None ],
193- ["alice" , "charlie" ],
194- [np .nan , "alice" ],
195- ]
196- observations = np .array (observations , dtype = object )
197- enc = GapEncoder (handle_missing = missing , n_components = 3 )
198- if missing == "error" :
199- with pytest .raises (ValueError , match = "Input data contains missing values" ):
200- enc .fit_transform (observations )
201- elif missing == "zero_impute" :
202- enc .fit_transform (observations )
203- enc .partial_fit (observations )
204- else :
205- with pytest .raises (
206- ValueError ,
207- match = r"handle_missing should be either "
208- r"'error' or 'zero_impute', got 'aaa'" ,
209- ):
210- enc .fit_transform (observations )
183+ # @pytest.mark.parametrize(
184+ # "missing",
185+ # ["zero_impute", "error", "aaa"],
186+ # )
187+ # def test_missing_values(missing: str):
188+ # """Test what happens when missing values are in the data"""
189+ # observations = [
190+ # ["alice", "bob"],
191+ # [pd.NA, "alice"],
192+ # ["bob", None],
193+ # ["alice", "charlie"],
194+ # [np.nan, "alice"],
195+ # ]
196+ # observations = np.array(observations, dtype=object)
197+ # enc = GapEncoder(handle_missing=missing, n_components=3)
198+ # if missing == "error":
199+ # with pytest.raises(ValueError, match="Input data contains missing values"):
200+ # enc.fit_transform(observations)
201+ # elif missing == "zero_impute":
202+ # enc.fit_transform(observations)
203+ # enc.partial_fit(observations)
204+ # else:
205+ # with pytest.raises(
206+ # ValueError,
207+ # match=r"handle_missing should be either "
208+ # r"'error' or 'zero_impute', got 'aaa'",
209+ # ):
210+ # enc.fit_transform(observations)
211211
212212
213213# def test_check_fitted_gap_encoder():
0 commit comments