def setup_work_direc():
 work_dir = tempfile.mkdtemp('work')
 backup_dir = os.path.join(work_dir, 'backup')
 return mock.MagicMock(work_dir=work_dir, backup_dir=backup_dir, temp_checkpoint_dir=os.path.join(work_dir, 'temp'), in_progress_dir=os.path.join(backup_dir, 'in_progress_dir'))

def setup_work_direc ( ) : work_dir = tempfile . mkdtemp ( 'work' ) backup_dir = os . path . join ( work_dir , 'backup' ) return mock . MagicMock ( work_dir = work_dir , backup_dir = backup_dir , temp_checkpoint_dir = os . path . join ( work_dir , 'temp' ) , in_progress_dir = os . path . join ( backup_dir , 'in_progress_dir' ) )
setup directories .