Beispiel #1
0
    def view_tasks(self):
        cleaned_tasks = self.get_prepared_tasks()

        scream(what="view")
        for k, v in cleaned_tasks.items():
            beautify_task_name(k)
            beautify_task_cmd(v)
Beispiel #2
0
    def view_tasklist(self):
        deps = self._prep_deps()

        scream(what="list")
        click.echo()
        for k, v in deps.items():
            click.secho("-" + " " + k, fg="yellow")
            for cmd in v:
                click.echo(" " * 2 + "-" + " " + cmd)
Beispiel #3
0
    def run_all_tasks(self):
        cleaned_tasks = super().get_prepared_tasks()
        scream(what="run")
        for task_name, task_chunk in cleaned_tasks.items():

            if not task_name.startswith("//"):
                run_task(
                    task_chunk,
                    task_name,
                    interactive=self.show_outputs,
                    catch_errors=self.catch_errors,
                )
            else:
                beautify_skiptask_name(task_name)
Beispiel #4
0
def test_scream(capsys):
    scream("run")
    captured = capsys.readouterr()
    assert captured.out == "\nRUNNING TASKS...\n------------------\n"

    scream("view")
    captured = capsys.readouterr()
    assert captured.out == "\nVIEWING TASKS...\n------------------\n"

    scream("list")
    captured = capsys.readouterr()
    assert captured.out == "\nTASK LIST...\n------------------\n"