#NEWLINE# def test_on_change_good_closure( ) : #NEWLINE# #INDENT# def good( x , y , z ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# m = cbm . CallbackManager ( ) #NEWLINE# m . on_change ( 'foo' , m ) #NEWLINE# assert ( len ( m . _callbacks ) == 1 ) #NEWLINE# assert ( len ( m . _callbacks [ 'foo' ] ) == 1 )