#NEWLINE# def test_on_next_equality( ) : #NEWLINE# #INDENT# n1 = OnNext ( 42 ) #NEWLINE# n2 = OnNext ( 42 ) #NEWLINE# n3 = OnNext ( 24 ) #NEWLINE# n4 = OnCompleted ( ) #NEWLINE# assert n1 . equals ( n1 ) #NEWLINE# assert n1 . equals ( n2 ) #NEWLINE# assert n2 . equals ( n1 ) #NEWLINE# assert ( not n1 . equals ( None ) ) #NEWLINE# assert ( not n1 . equals ( n3 ) ) #NEWLINE# assert ( not n3 . equals ( n1 ) ) #NEWLINE# assert ( not n1 . equals ( n4 ) ) #NEWLINE# assert ( not n4 . equals ( n1 ) )