#NEWLINE# def test_clone_worktree_happy( qisrc_action , git_server , tmpdir ) : #NEWLINE# #INDENT# git_server . create_repo ( 'foo.git' ) #NEWLINE# qisrc_action ( 'init' , git_server . manifest_url ) #NEWLINE# git_worktree = TestGitWorkTree ( ) #NEWLINE# foo_proj = git_worktree . get_git_project ( 'foo' ) #NEWLINE# work2 = tmpdir . join ( 'work2' ) . ensure ( dir = True ) #NEWLINE# with mock . patch ( 'qisrc.git.Git' , GitRecorder ) : #NEWLINE# #INDENT# qisrc_action . chdir ( qisrc_action . strpath ) #NEWLINE# qisrc_action ( 'init' , git_server . manifest_url , '--clone' , qisrc_action . root ) #NEWLINE# all_args = [ ' ' . join ( x [ 1 ] ) for x in GitRecorder . call_args ] #NEWLINE# assert [ x for x in all_args if ( foo_proj . path in x ) ]