#NEWLINE# def test_command_hooks( self ) : #NEWLINE# #INDENT# 'Test command hooks.\n\n        Simple test that the appropriate command hooks run at the\n        beginning/end of the appropriate command.\n        ' #NEWLINE# ( stdout , _ , return_code ) = self . run_setup ( 'egg_info' ) #NEWLINE# assert ( 'build_ext pre-hook' not in stdout ) #NEWLINE# assert ( 'build_ext post-hook' not in stdout ) #NEWLINE# assert ( return_code == 0 ) #NEWLINE# ( stdout , stderr , return_code ) = self . run_setup ( 'build_ext' ) #NEWLINE# self . addDetailUniqueName ( 'stderr' , text_content ( stderr ) ) #NEWLINE# assert ( textwrap . dedent ( '\n            running build_ext\n            running pre_hook pbr_testpackage._setup_hooks.test_pre_hook for command build_ext\n            build_ext pre-hook\n        ' ) in stdout ) #NEWLINE# self . expectThat ( stdout , EndsWith ( 'build_ext post-hook' ) ) #NEWLINE# assert ( return_code == 0 )