Skip to content

Commit

Permalink
TST Fix test_clone_sparse_matrices on scipy dev (scikit-learn#26556)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiedbb committed Jun 12, 2023
1 parent 0e253d9 commit 1e8a5b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sklearn/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ def test_clone_nan():

def test_clone_sparse_matrices():
sparse_matrix_classes = [
getattr(sp, name) for name in dir(sp) if name.endswith("_matrix")
cls
for name in dir(sp)
if name.endswith("_matrix") and type(cls := getattr(sp, name)) is type
]

for cls in sparse_matrix_classes:
Expand Down

0 comments on commit 1e8a5b8

Please sign in to comment.