def test_matrix_to_expr_operator(matrix_form, expr1, expr2): assert sp.simplify( sp.Eq(matrix_to_expr_operator(matrix_form)(expr1), expr2) )