#NEWLINE# def test_hook_id_not_present( tempdir_factory , store , fake_log_handler ) : #NEWLINE# #INDENT# path = make_repo ( tempdir_factory , 'script_hooks_repo' ) #NEWLINE# config = make_config_from_repo ( path ) #NEWLINE# config [ 'hooks' ] [ 0 ] [ 'id' ] = 'i-dont-exist' #NEWLINE# repo = Repository . create ( config , store ) #NEWLINE# with pytest . raises ( SystemExit ) : #NEWLINE# #INDENT# repo . install ( ) #NEWLINE# #UNINDENT# assert ( fake_log_handler . handle . call_args [ 0 ] [ 0 ] . msg == '`i-dont-exist` is not present in repository {0}.  Typo? Perhaps it is introduced in a newer version?  Often `pre-commit autoupdate` fixes this.' . format ( path ) )