diff --git a/bundle/python/transform_test.go b/bundle/python/transform_test.go index c7b1f36e7e..fb2c23e42d 100644 --- a/bundle/python/transform_test.go +++ b/bundle/python/transform_test.go @@ -1,6 +1,7 @@ package python import ( + "context" "strings" "testing" @@ -99,3 +100,34 @@ func TestTransformFiltersWheelTasksOnly(t *testing.T) { require.Equal(t, "key1", tasks[0].Task.TaskKey) require.NotNil(t, tasks[0].Task.PythonWheelTask) } + +func TestNoPanicWithNoPythonWheelTasks(t *testing.T) { + tmpDir := t.TempDir() + b := &bundle.Bundle{ + Config: config.Root{ + Path: tmpDir, + Bundle: config.Bundle{ + Target: "development", + }, + Resources: config.Resources{ + Jobs: map[string]*resources.Job{ + "test": { + Paths: resources.Paths{ + ConfigFilePath: tmpDir, + }, + JobSettings: &jobs.JobSettings{ + Tasks: []jobs.Task{ + { + TaskKey: "notebook_task", + NotebookTask: &jobs.NotebookTask{}}, + }, + }, + }, + }, + }, + }, + } + trampoline := TransformWheelTask() + err := bundle.Apply(context.Background(), b, trampoline) + require.NoError(t, err) +}