refact: remove output to tasks
This commit is contained in:
@@ -7,7 +7,6 @@ def test_build_task_generate():
|
||||
assert task.action == "GENERATE"
|
||||
assert task.args == {"subject": "01"}
|
||||
assert task.deps == [template]
|
||||
assert task.output == "01_source.tex"
|
||||
|
||||
|
||||
def test_build_task_activate_corr_on():
|
||||
@@ -16,7 +15,6 @@ def test_build_task_activate_corr_on():
|
||||
assert task.action == "ACTIVATE_CORR"
|
||||
assert task.args == {}
|
||||
assert task.deps == [src]
|
||||
assert task.output == "corr_source.tex"
|
||||
|
||||
|
||||
def test_build_task_compile():
|
||||
@@ -25,7 +23,6 @@ def test_build_task_compile():
|
||||
assert task.action == "COMPILE"
|
||||
assert task.args == {}
|
||||
assert task.deps == [src]
|
||||
assert task.output == "source.pdf"
|
||||
|
||||
|
||||
def test_build_task_join():
|
||||
@@ -34,7 +31,6 @@ def test_build_task_join():
|
||||
assert task.action == "JOIN"
|
||||
assert task.args == {}
|
||||
assert task.deps == pdfs
|
||||
assert task.output == "joined.pdf"
|
||||
|
||||
|
||||
def test_build_task_compile():
|
||||
@@ -43,4 +39,3 @@ def test_build_task_compile():
|
||||
assert task.action == "CLEAN"
|
||||
assert task.args == {}
|
||||
assert task.deps == files
|
||||
assert task.output is None
|
||||
|
||||
@@ -5,14 +5,14 @@ from bopytex.scheduler import Scheduler
|
||||
def test_schedule_append():
|
||||
actions = {"DO": lambda _: "done"}
|
||||
scheduler = Scheduler(actions)
|
||||
tasks = [Task(action="DO", args={}, deps=[], output="")]
|
||||
tasks = [Task(action="DO", args={}, deps=[])]
|
||||
scheduler.append(tasks)
|
||||
assert scheduler.tasks == tasks
|
||||
|
||||
def test_schedule_dispatch():
|
||||
actions = {"DO": lambda _: "done"}
|
||||
scheduler = Scheduler(actions)
|
||||
task = Task(action="DO", args={}, deps=[], output="Nothing")
|
||||
task = Task(action="DO", args={}, deps=[])
|
||||
result = scheduler.dispatch(task)
|
||||
assert result == "done"
|
||||
|
||||
@@ -20,8 +20,8 @@ def test_schedule_dispatch():
|
||||
def test_schedule_one_task():
|
||||
actions = {"DO": lambda _: "done"}
|
||||
scheduler = Scheduler(actions)
|
||||
scheduler.append([Task(action="DO", args={}, deps=[], output="Nothing")])
|
||||
scheduler.append([Task(action="DO", args={}, deps=[])])
|
||||
result = scheduler.__next__()
|
||||
assert result == "done"
|
||||
assert scheduler.tasks == []
|
||||
assert scheduler.done == ["Nothing"]
|
||||
assert scheduler.done == ["done"]
|
||||
|
||||
Reference in New Issue
Block a user