#NEWLINE# def test_too_new_version( tempdir_factory , store , fake_log_handler ) : #NEWLINE# #INDENT# path = make_repo ( tempdir_factory , 'script_hooks_repo' ) #NEWLINE# with modify_manifest ( path ) as manifest : #NEWLINE# #INDENT# manifest [ 0 ] [ 'minimum_pre_commit_version' ] = '999.0.0' #NEWLINE# #UNINDENT# config = make_config_from_repo ( path ) #NEWLINE# repo = Repository . create ( config , store ) #NEWLINE# with pytest . raises ( SystemExit ) : #NEWLINE# #INDENT# repo . install ( ) #NEWLINE# #UNINDENT# msg = fake_log_handler . handle . call_args [ 0 ] [ 0 ] . msg #NEWLINE# assert re . match ( '^The hook `bash_hook` requires pre-commit version 999\\.0\\.0 but version \\d+\\.\\d+\\.\\d+ is installed.  Perhaps run `pip install --upgrade pre-commit`\\.$' , msg )