Пример #1
0
    def test_adding_tasks(self):
        tg = TaskGroup("task group 0")
        tg.task("task 0").tasks(["task 1", "task 2"])

        obj = tg.to_map()
        assert "task 0" in obj["tasks"]
        assert "task 1" in obj["tasks"]
        assert "task 2" in obj["tasks"]
Пример #2
0
    def test_invalid_task(self):
        tg = TaskGroup("task group 0")

        with pytest.raises(TypeError):
            tg.task(42)