#NEWLINE# @ XFAIL #NEWLINE# def test_non_commutative_cse( ) : #NEWLINE# #INDENT# ( A , B , C ) = symbols ( 'A B C' , commutative = False ) #NEWLINE# l = [ ( ( A * B ) * C ) , ( A * C ) ] #NEWLINE# assert ( cse ( l ) == ( [ ] , l ) ) #NEWLINE# l = [ ( ( A * B ) * C ) , ( A * B ) ] #NEWLINE# assert ( cse ( l ) == ( [ ( x0 , ( A * B ) ) ] , [ ( x0 * C ) , x0 ] ) )