def test_sparse_precomputed():
    clf = svm.SVC(kernel='precomputed')
    sparse_gram = sparse.csr_matrix([[1, 0], [0, 1]])
    try:
        clf.fit(sparse_gram, [0, 1])
        assert not "reached"
    except __HOLE__ as e:
        assert_in("Sparse precomputed", str(e))
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/svm/tests/test_svm.py/test_sparse_precomputed