#NEWLINE# def test_basic( self ) : #NEWLINE# #INDENT# 'Test basic functionality of the messenger.' #NEWLINE# m = messenger . Messenger ( ) #NEWLINE# orig_len = len ( m . _signals ) #NEWLINE# b = B ( ) #NEWLINE# b . send ( 1 , test = 1 ) #NEWLINE# self . assertEqual ( b . a . event , 'method' ) #NEWLINE# self . assertEqual ( ret [ 0 ] , 'function' ) #NEWLINE# self . assertEqual ( b . a . args , ( 1 , ) ) #NEWLINE# self . assertEqual ( ret [ 1 ] , ( 1 , ) ) #NEWLINE# self . assertEqual ( b . a . kw , { #NEWLINE# #INDENT# 'test' : 1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( ret [ 2 ] , { #NEWLINE# #INDENT# 'test' : 1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( ( len ( b . _signals ) > orig_len ) , True ) #NEWLINE# del b #NEWLINE# self . assertEqual ( len ( m . _signals ) , orig_len )