def METHOD_NAME(self, method, opt, dtype):
    """
    Test that the binary operation is mathematically correct for all the
    known type specialisations.
    """
    if dtype is Dia and method == "mkl_spsolve":
        pytest.skip("mkl is not supported for dia matrix")
    A = self._gen_op(10, dtype)
    b = self._gen_ket(10, Dense)
    expected = self.op_numpy(A.to_array(), b.to_array())
    test = _data.solve_csr_dense(A, b, method, opt)
    test1 = _data.solve(A, b, method, opt)
    assert test.shape == expected.shape
    np.testing.assert_allclose(test.to_array(), expected,
                               atol=1e-7, rtol=1e-7)
    np.testing.assert_allclose(test1.to_array(), expected,
                               atol=1e-7, rtol=1e-7)