Skip to content

Commit

Permalink
Add test which fails
Browse files Browse the repository at this point in the history
```
================================================================ 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

```
  • Loading branch information
psolomin committed May 1, 2023
1 parent 48a397e commit c5074da
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/test_task.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from typing import Any, Dict

import luigi

from kubeluigi import KubernetesJobTask


class DummyK8sTask(KubernetesJobTask, luigi.Task):
@property
def name(self) -> str:
return "dummy-tsk"

def spec_schema(self) -> Dict[str, Any]:
return {}

def run(self):
pass


def test_task_can_be_scheduled_by_luigi():
luigi.build([DummyK8sTask()], local_scheduler=True, log_level="WARNING")

0 comments on commit c5074da

Please sign in to comment.