Skip to content

Commit b90475a

Browse files
committed
Update test_classification_kmeans.py
1 parent 7a5f6ed commit b90475a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

_unittests/ut_mlmodel/test_classification_kmeans.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ def test_classification_kmeans_intercept_weights(self):
5757
def test_classification_kmeans_pickle(self):
5858
iris = datasets.load_iris()
5959
X, y = iris.data, iris.target
60-
test_sklearn_pickle(lambda: ClassifierAfterKMeans(), X, y)
60+
try:
61+
test_sklearn_pickle(lambda: ClassifierAfterKMeans(), X, y)
62+
except AttributeError as e:
63+
if compare_module_version(sklver, "0.24") < 0:
64+
return
65+
raise e
6166

6267
def test_classification_kmeans_clone(self):
6368
self.maxDiff = None

0 commit comments

Comments
 (0)