def test_coeff2():
    r, kappa = symbols('r, kappa')
    psi = Function("psi")
    g = 1/r**2 * (2*r*psi(r).diff(r, 1) + r**2 * psi(r).diff(r, 2))
    g = g.expand()
    assert g.coeff((psi(r).diff(r))) == r/2
dataset/ETHPy150Open sympy/sympy/sympy/core/tests/test_expr.py/test_coeff2/swapped operands of `/`