Skip to content

Commit bd5c33e

Browse files
authored
Fix failing sklearn test (#3850)
1 parent 725b855 commit bd5c33e

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/integration/diag_scripts/mlr/test_custom_sklearn_functions.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
# pylint: disable=too-few-public-methods
4343
# pylint: disable=too-many-arguments
4444

45-
import warnings
4645
from copy import copy, deepcopy
4746

4847
import numpy as np
@@ -505,9 +504,7 @@ def test_is_pairwise():
505504
"""Test ``_is_pairwise``."""
506505
# Simple checks for _is_pairwise
507506
pca = KernelPCA(kernel='precomputed')
508-
with warnings.catch_warnings():
509-
warnings.simplefilter("error") # make sure that no warning is raised
510-
assert _is_pairwise(pca)
507+
assert _is_pairwise(pca)
511508

512509
# Pairwise attribute that is not consistent with the pairwise tag
513510
class IncorrectTagPCA(KernelPCA):
@@ -533,9 +530,7 @@ class TruePairwise(BaseEstimator):
533530

534531
# Pairwise attribute is not defined thus tag is used
535532
est = BaseEstimator()
536-
with warnings.catch_warnings():
537-
warnings.simplefilter("error") # make sure that no warning is raised
538-
assert not _is_pairwise(est)
533+
assert not _is_pairwise(est)
539534

540535

541536
# _safe_split

0 commit comments

Comments
 (0)