#NEWLINE# def test_cleanup( self ) : #NEWLINE# #INDENT# "Environment's hooks are cleaned up on deallocate." #NEWLINE# hook = hook . environment . _hookmanager . hooks [ 0 ] #NEWLINE# self . environment . deallocate ( ) #NEWLINE# self . assertTrue ( hook . clean )