MCPcopy Index your code
hub / github.com/go-python/gopy / writeGoMod

Function writeGoMod

main_test.go:967–978  ·  view source on GitHub ↗
(t *testing.T, pkgDir, tstDir string)

Source from the content-addressed store, hash-verified

965}
966
967func writeGoMod(t *testing.T, pkgDir, tstDir string) {
968 template := `
969module dummy
970
971require github.com/go-python/gopy v0.0.0
972replace github.com/go-python/gopy => %s
973`
974 contents := fmt.Sprintf(template, pkgDir)
975 if err := os.WriteFile(filepath.Join(tstDir, "go.mod"), []byte(contents), 0666); err != nil {
976 t.Fatalf("failed to write go.mod file: %v", err)
977 }
978}
979
980func testPkgBackend(t *testing.T, pyvm string, table pkg) {
981 curPkgPath := reflect.TypeOf(table).PkgPath()

Callers 1

testPkgBackendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected