From 54e89511b82194f40df486573d4eb1d9c9031762 Mon Sep 17 00:00:00 2001
From: zxcvbnius <zxcvbnius@gmail.com>
Date: Fri, 31 Mar 2017 19:20:49 -0400
Subject: [PATCH] [MRG+1] Fix test of SingleInheritanceEstimator to not raise
 DeprecationWarning (#8526)

* Fix test of SingleInheritanceEstimator to not raise DeprecationWarning

* [MRG+1] Fix test of SingleInheritanceEstimator to not raise DeprecationWarning (#8526)

Fix: test of SingleInheritanceEstimator to not raise DeprecationWarning (#8526)

- Ignore a DeprecationWarning about unpickling an estimator from a different version

* [MRG+2] Fix test of SingleInheritanceEstimator to not raise DeprecationWarning (#8526)

Fix: test of SingleInheritanceEstimator to not raise DeprecationWarning (#8526)

  - Test of SingleInheritanceEstimator would raise UserWarning, not DeprecationWarning
  - Ignore a UserWarning about unpickling an estimator from a different version
---
 sklearn/tests/test_base.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sklearn/tests/test_base.py b/sklearn/tests/test_base.py
index 740e83105c..8112e7fd81 100644
--- a/sklearn/tests/test_base.py
+++ b/sklearn/tests/test_base.py
@@ -14,6 +14,7 @@ from sklearn.utils.testing import assert_raises
 from sklearn.utils.testing import assert_no_warnings
 from sklearn.utils.testing import assert_warns_message
 from sklearn.utils.testing import assert_dict_equal
+from sklearn.utils.testing import ignore_warnings
 
 from sklearn.base import BaseEstimator, clone, is_classifier
 from sklearn.svm import SVC
@@ -440,6 +441,7 @@ class SingleInheritanceEstimator(BaseEstimator):
         return data
 
 
+@ignore_warnings(category=(UserWarning))
 def test_pickling_works_when_getstate_is_overwritten_in_the_child_class():
     estimator = SingleInheritanceEstimator()
     estimator._attribute_not_pickled = "this attribute should not be pickled"
-- 
GitLab