def test_noncommutative_expand_issue_3757():
    A, B, C = symbols('A,B,C', commutative=False)
    assert B*A - A*B != 0
    assert (A*(A + B)*B).expand() == A**2*B + A*B**2
    assert (A*(A + B + C)*B).expand() == A**2*B + A*B**2 + A*C*B
dataset/ETHPy150Open sympy/sympy/sympy/core/tests/test_expr.py/test_noncommutative_expand_issue_3757/swapped operands of `-`