#NEWLINE# def test_x_minus_y_not_same_as_x_lt_y( ) : #NEWLINE# #INDENT# '\n    A consequence of pull request #7792 is that `x - y < 0` and `x < y`\n    are not synonymous.\n    ' #NEWLINE# x = ( I + 2 ) #NEWLINE# y = ( I + 3 ) #NEWLINE# raises ( TypeError , ( lambda : ( x < y ) ) ) #NEWLINE# assert ( ( x - y ) < 0 ) #NEWLINE# ineq = Lt ( x , y , evaluate = False ) #NEWLINE# raises ( TypeError , ( lambda : ineq . doit ( ) ) ) #NEWLINE# assert ( ( ineq . lhs - ineq . rhs ) < 0 ) #NEWLINE# t = Symbol ( 't' , imaginary = True ) #NEWLINE# x = ( 2 + t ) #NEWLINE# y = ( 3 + t ) #NEWLINE# ineq = Lt ( x , y , evaluate = False ) #NEWLINE# raises ( TypeError , ( lambda : ineq . doit ( ) ) ) #NEWLINE# assert ( ( ineq . lhs - ineq . rhs ) < 0 ) #NEWLINE# x = ( I + 2 ) #NEWLINE# y = ( ( 2 * I ) + 3 ) #NEWLINE# raises ( TypeError , ( lambda : ( x < y ) ) ) #NEWLINE# raises ( TypeError , ( lambda : ( ( x - y ) < 0 ) ) )