#NEWLINE# @ pytest . mark . integration #NEWLINE# def test_tags_on_repositories( in_tmpdir , tempdir_factory , store ) : #NEWLINE# #INDENT# tag = 'v1.1' #NEWLINE# git_dir_1 = _create_repo_with_tags ( tempdir_factory , 'prints_cwd_repo' , tag ) #NEWLINE# git_dir_2 = _create_repo_with_tags ( tempdir_factory , 'script_hooks_repo' , tag ) #NEWLINE# repo_1 = Repository . create ( make_config_from_repo ( git_dir_1 , sha = tag ) , store ) #NEWLINE# ret = repo_1 . run_hook ( repo_1 . hooks [ 0 ] [ 1 ] , [ '-L' ] ) #NEWLINE# assert ( ret [ 0 ] == 0 ) #NEWLINE# assert ( ret [ 1 ] . strip ( ) == _norm_pwd ( in_tmpdir ) ) #NEWLINE# repo_2 = Repository . create ( make_config_from_repo ( tempdir_factory , sha = tag ) , store ) #NEWLINE# ret = repo_2 . run_hook ( repo_2 . hooks [ 0 ] [ 1 ] , [ 'bar' ] ) #NEWLINE# assert ( ret [ 0 ] == 0 ) #NEWLINE# assert ( ret [ 1 ] == b'bar\nHello World\n' )