diff --git a/tests/python_package_test/test_dask.py b/tests/python_package_test/test_dask.py index e34074515d3c..a86fcf882470 100644 --- a/tests/python_package_test/test_dask.py +++ b/tests/python_package_test/test_dask.py @@ -8,8 +8,10 @@ from os import getenv from sys import platform -import lightgbm as lgb import pytest + +import lightgbm as lgb + if not platform.startswith('linux'): pytest.skip('lightgbm.dask is currently supported in Linux environments', allow_module_level=True) if not lgb.compat.DASK_INSTALLED: @@ -21,16 +23,15 @@ import joblib import numpy as np import pandas as pd -from scipy.stats import spearmanr from dask.array.utils import assert_eq -from dask.distributed import default_client, Client, LocalCluster, wait +from dask.distributed import Client, LocalCluster, default_client, wait from distributed.utils_test import client, cluster_fixture, gen_cluster, loop from scipy.sparse import csr_matrix +from scipy.stats import spearmanr from sklearn.datasets import make_blobs, make_regression from .utils import make_ranking - # time, in seconds, to wait for the Dask client to close. Used to avoid teardown errors # see https://distributed.dask.org/en/latest/api.html#distributed.Client.close CLIENT_CLOSE_TIMEOUT = 120