def test_git_require_no_update():
 from fabtools.require.git import working_copy
 try:
  working_copy(REMOTE_URL, path='wc')
  run('tar -c -f wc_old.tar --exclude .git wc')
  old_md5 = md5sum('wc_old.tar')
  working_copy(REMOTE_URL, path='wc', update=False)
  run('tar -c -f wc_new.tar --exclude .git wc')
  new_md5 = md5sum('wc_new.tar')
  assert (old_md5 == new_md5)
 finally:
  run('rm -rf wc')

def test_git_require_no_update ( ) : from fabtools . require . git import working_copy try : working_copy ( REMOTE_URL , path = 'wc' ) run ( 'tar -c -f wc_old.tar --exclude .git wc' ) old_md5 = md5sum ( 'wc_old.tar' ) working_copy ( REMOTE_URL , path = 'wc' , update = False ) run ( 'tar -c -f wc_new.tar --exclude .git wc' ) new_md5 = md5sum ( 'wc_new.tar' ) assert ( old_md5 == new_md5 ) finally : run ( 'rm -rf wc' )
test working_copy() with update=false .