From 9528f70e2f4c3a790000af85632c8e492314d499 Mon Sep 17 00:00:00 2001 From: jmyrberg Date: Tue, 29 Dec 2020 02:26:02 +0200 Subject: [PATCH] Add utils.testing support for sklearn>=0.24.0 --- tests/test_aakr.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_aakr.py b/tests/test_aakr.py index 4371465..2fb7e3e 100644 --- a/tests/test_aakr.py +++ b/tests/test_aakr.py @@ -4,7 +4,11 @@ import pytest from sklearn.datasets import load_linnerud -from sklearn.utils.testing import assert_allclose + +try: # scikit-learn < 0.24.0 + from sklearn.utils.testing import assert_allclose +except ModuleNotFoundError: # scikit-learn >= 0.24.0 + from sklearn.utils._testing import assert_allclose from aakr import AAKR