circuitpython/tests/basics/equal.py
Damien George 8f19317540 py: Remove useless implementations of NOT_EQUAL in binary_op's.
I'm pretty sure these are never reached, since NOT_EQUAL is always
converted into EQUAL in mp_binary_op.  No one should call
type.binary_op directly, they should always go through mp_binary_op
(or mp_obj_is_equal).
2014-04-12 00:20:39 +01:00

76 lines
1.0 KiB
Python

# test equality
print(None == None)
print(False == None)
print(False == False)
print(False == True)
print(() == ())
print(() == [])
print([] == [])
print(() == {})
print({} == ())
print(() == None)
print(() == False)
print(() == print)
print([] == None)
print([] == False)
print([] == print)
print({} == None)
print({} == False)
print({} == print)
print(1 == 1)
print(1 == 2)
print(1 == ())
print(1 == [])
print(1 == {})
print(1 == 'a')
print('a' == 'a')
print('a' == 'ab')
print('a' == 1)
print('a' == ())
# same as above but with !=
print(None != None)
print(False != None)
print(False != False)
print(False != True)
print(() != ())
print(() != [])
print([] != [])
print(() != {})
print({} != ())
print(() != None)
print(() != False)
print(() != print)
print([] != None)
print([] != False)
print([] != print)
print({} != None)
print({} != False)
print({} != print)
print(1 != 1)
print(1 != 2)
print(1 != ())
print(1 != [])
print(1 != {})
print(1 != 'a')
print('a' != 'a')
print('a' != 'ab')
print('a' != 1)
print('a' != ())