8000 [MRG+1] Fix test of SingleInheritanceEstimator to not raise Deprecati… · massich/scikit-learn@577ff96 · GitHub
[go: up one dir, main page]

Skip to content

Commit 577ff96

Browse files
zxcvbniusJoan Massich
authored andcommitted
[MRG+1] Fix test of SingleInheritanceEstimator to not raise DeprecationWarning (scikit-learn#8526)
* Fix test of SingleInheritanceEstimator to not raise DeprecationWarning * [MRG+1] Fix test of SingleInheritanceEstimator to not raise DeprecationWarning (scikit-learn#8526) Fix: test of SingleInheritanceEstimator to not raise DeprecationWarning (scikit-learn#8526) - Ignore a DeprecationWarning about unpickling an estimator from a different version * [MRG+2] Fix test of SingleInheritanceEstimator to not raise DeprecationWarning (scikit-learn#8526) Fix: test of SingleInheritanceEstimator to not raise DeprecationWarning (scikit-learn#8526) - Test of SingleInheritanceEstimator would raise UserWarning, not DeprecationWarning - Ignore a UserWarning about unpickling an estimator from a different version
1 parent f8bc81e commit 577ff96

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sklearn/tests/test_base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from sklearn.utils.testing import assert_no_warnings
1515
from sklearn.utils.testing import assert_warns_message
1616
from sklearn.utils.testing import assert_dict_equal
17+
from sklearn.utils.testing import ignore_warnings
1718

1819
from sklearn.base import BaseEstimator, clone, is_classifier
1920
from sklearn.svm import SVC
@@ -440,6 +441,7 @@ def __getstate__(self):
440441
return data
441442

442443

444+
@ignore_warnings(category=(UserWarning))
443445
def test_pickling_works_when_getstate_is_overwritten_in_the_child_class():
444446
estimator = SingleInheritanceEstimator()
445447
estimator._attribute_not_pickled = "this attribute should not be pickled"

0 commit comments

Comments
 (0)
0