Skip to content

Commit 3d91095

Browse files
committed
test(model_splitter): fix the scikit-learn requires_pkg marker
requires_pkg() resolves a distribution name and imports the matching module, and scikit-learn matches neither name on its own: the distribution is scikit-learn and the module is sklearn. test_save_load_node_mapping_structured was therefore skipped everywhere, including the nightly optional dependency build, and had never run. Map the distribution to its module so the test runs.
1 parent 6c8b29b commit 3d91095

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

autotest/test_model_splitter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def test_metis_splitting_with_lak_sfr(function_tmpdir):
221221
@requires_exe("mf6")
222222
@requires_pkg("pymetis")
223223
@requires_pkg("h5py")
224-
@requires_pkg("sklearn")
224+
@requires_pkg("scikit-learn", name_map={"scikit-learn": "sklearn"})
225225
def test_save_load_node_mapping_structured(function_tmpdir):
226226
import pymetis
227227

0 commit comments

Comments
 (0)