Skip to content

Commit

Permalink
Update sklearn tests to be compatible with current pytest version (py…
Browse files Browse the repository at this point in the history
…test >=8.0.0) Part 2 (#3518)

Co-authored-by: Valeriu Predoi <[email protected]>
  • Loading branch information
schlunma and valeriupredoi authored Feb 1, 2024
1 parent 24d99df commit 509f3e4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
# pylint: disable=too-few-public-methods
# pylint: disable=too-many-arguments

import warnings
from copy import deepcopy

import numpy as np
Expand Down Expand Up @@ -720,9 +721,9 @@ def test_fit_transformer_fail(self):
inverse_func=self.square,
check_inverse=False,
)
with pytest.warns(None) as record:
with warnings.catch_warnings():
warnings.simplefilter("error") # make sure no warning is raised
areg._fit_transformer(self.Y_2D)
assert not record

def test_fit_transformer_transformer(self):
"""Test ``_fit_transformer`` with transformer."""
Expand Down

0 comments on commit 509f3e4

Please sign in to comment.