8000 TST Extend tests for `scipy.sparse.*array` in `sklearn/utils/tests/test_mocking.py` by StefanieSenger · Pull Request #27319 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

TST Extend tests for scipy.sparse.*array in sklearn/utils/tests/test_mocking.py #27319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions sklearn/utils/tests/test_mocking.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
_MockEstimatorOnOffPrediction,
)
from sklearn.utils._testing import _convert_container
from sklearn.utils.fixes import CSR_CONTAINERS


@pytest.fixture
Expand Down Expand Up @@ -121,9 +122,10 @@ def test_checking_classifier(iris, input_type):
assert_allclose(y_decision, 0)


def test_checking_classifier_with_params(iris):
@pytest.mark.parametrize("csr_container", CSR_CONTAINERS)
def test_checking_classifier_with_params(iris, csr_container):
X, y = iris
X_sparse = sparse.csr_matrix(X)
X_sparse = csr_container(X)

clf = CheckingClassifier(check_X=sparse.issparse)
with pytest.raises(AssertionError):
Expand Down
0