Пример #1
0
def cmd_clean(params, args):
    """execute cmd 'clean' """
    dodo_tasks = loader.get_tasks(*_path_params(params))
    params.update_defaults(dodo_tasks['config'])
    options = args or dodo_tasks['config'].get('default_tasks')
    return doit_clean(dodo_tasks['task_list'], sys.stdout, params['dryrun'],
                      params['cleandep'], options)
Пример #2
0
 def test_clean_taskdep_once(self, tasks):
     output = StringIO.StringIO()
     cmds.doit_clean(self.tasks, output, False, True, ['t1', 't2'])
     assert ['t2', 't1'] == self.cleaned
Пример #3
0
 def test_clean_selected(self, tasks):
     output = StringIO.StringIO()
     cmds.doit_clean(self.tasks, output, False, False, ['t2'])
     assert ['t2'] == self.cleaned
Пример #4
0
 def test_clean_all(self, tasks):
     output = StringIO.StringIO()
     cmds.doit_clean(self.tasks, output, False, False, [])
     assert ['t1','t2'] == self.cleaned