def test_issue_6366():
    n = Symbol('n', integer=True, positive=True)
    r = x/(x - 1) - (n + 1)*x**(n + 1)/(x**(n + 1) - 1)
    assert limit(r, x, 1).simplify() == n/2
dataset/ETHPy150Open sympy/sympy/sympy/series/tests/test_limits.py/test_issue_6366/swapped operands of `-`