github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/python/gen_program_test/batchyaml/gen_program_test.go (about) 1 package batchyaml 2 3 import ( 4 "os" 5 "testing" 6 7 "github.com/stretchr/testify/assert" 8 9 codegenPy "github.com/pulumi/pulumi/pkg/v3/codegen/python" 10 "github.com/pulumi/pulumi/pkg/v3/codegen/testing/test" 11 ) 12 13 // This specifically tests the synced examples from pulumi/yaml with 14 // testing/test/testdata/transpiled_examples 15 func TestGenerateProgram(t *testing.T) { 16 t.Parallel() 17 err := os.Chdir("../../../python") // chdir into codegen/python 18 assert.Nil(t, err) 19 20 test.TestProgramCodegen(t, 21 test.ProgramCodegenOptions{ 22 Language: "python", 23 Extension: "py", 24 OutputFile: "__main__.py", 25 Check: codegenPy.Check, 26 GenProgram: codegenPy.GenerateProgram, 27 TestCases: test.PulumiPulumiYAMLProgramTests, 28 }) 29 }