Skip to content

Commit c5074da

Browse files
committed
Add test which fails
``` ================================================================ short test summary info ================================================================= FAILED test/test_task.py::test_task_can_be_scheduled_by_luigi - luigi.worker.TaskException: Task of class DummyK8sTask not initialized. Did you override __init__ and forget to call super(...).__init__? ======================================================== 1 failed, 18 passed, 1 warning in 1.69s ========================================================= nox > Command pytest failed with exit code 1 ```
1 parent 48a397e commit c5074da

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/test_task.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from typing import Any, Dict
2+
3+
import luigi
4+
5+
from kubeluigi import KubernetesJobTask
6+
7+
8+
class DummyK8sTask(KubernetesJobTask, luigi.Task):
9+
@property
10+
def name(self) -> str:
11+
return "dummy-tsk"
12+
13+
def spec_schema(self) -> Dict[str, Any]:
14+
return {}
15+
16+
def run(self):
17+
pass
18+
19+
20+
def test_task_can_be_scheduled_by_luigi():
21+
luigi.build([DummyK8sTask()], local_scheduler=True, log_level="WARNING")

0 commit comments

Comments
 (0)