def bzr_wc_source_local():
 test = 'bzr_wc_source_local'
 wt = ('%s-test-%s' % (DIR, test))
 puts(magenta(('Executing test: %s' % test)))
 import os
 from fabric.api import lcd, local, settings
 if (not os.getenv('BZR_LOCAL_TEST')):
  puts(('%s: SKIP: interactive test, set BZR_LOCAL_TEST env var to enable' % test))
  return
 with settings(warn_only=True):
  bzr = local('which bzr', capture=True)
 if bzr.failed:
  puts(('%s: SKIP: Bazaar not installed on local host' % test))
  return
 from fabtools.files import is_dir
 from fabtools import require
 local(('test ! -e %(wt)s || rm -rf %(wt)s' % {'wt': wt}))
 local(('bzr branch %s %s' % (REMOTE_URL, wt)))
 assert (not is_dir(wt))
 with lcd(wt):
  require.bazaar.working_copy('.', wt)
 assert_wc_exists(wt)
 local(('rm -rf %s' % wt))

def bzr_wc_source_local ( ) : test = 'bzr_wc_source_local' wt = ( '%s-test-%s' % ( DIR , test ) ) puts ( magenta ( ( 'Executing test: %s' % test ) ) ) import os from fabric . api import lcd , local , settings if ( not os . getenv ( 'BZR_LOCAL_TEST' ) ) : puts ( ( '%s: SKIP: interactive test, set BZR_LOCAL_TEST env var to enable' % test ) ) return with settings ( warn_only = True ) : bzr = local ( 'which bzr' , capture = True ) if bzr . failed : puts ( ( '%s: SKIP: Bazaar not installed on local host' % test ) ) return from fabtools . files import is_dir from fabtools import require local ( ( 'test ! -e %(wt)s || rm -rf %(wt)s' % { 'wt' : wt } ) ) local ( ( 'bzr branch %s %s' % ( REMOTE_URL , wt ) ) ) assert ( not is_dir ( wt ) ) with lcd ( wt ) : require . bazaar . working_copy ( '.' , wt ) assert_wc_exists ( wt ) local ( ( 'rm -rf %s' % wt ) )
test creating working copy from a local source .