(t *testing.T, table pkg)
| 942 | } |
| 943 | |
| 944 | func testPkg(t *testing.T, table pkg) { |
| 945 | backends := []string{"py3"} |
| 946 | // backends := table.lang // todo: enabling py2 testing requires separate "want" output |
| 947 | for _, be := range backends { |
| 948 | fmt.Printf("looping over backends: %s in %s\n", be, backends) |
| 949 | vm, ok := testBackends[be] |
| 950 | if !ok || vm == "" { |
| 951 | // backend not available. |
| 952 | t.Logf("Skipped testing backend %s for %s\n", be, table.path) |
| 953 | continue |
| 954 | } |
| 955 | switch be { |
| 956 | case "py3": |
| 957 | t.Run(be, func(t *testing.T) { |
| 958 | // t.Parallel() |
| 959 | testPkgBackend(t, vm, table) |
| 960 | }) |
| 961 | default: |
| 962 | t.Errorf("invalid backend name %q", be) |
| 963 | } |
| 964 | } |
| 965 | } |
| 966 | |
| 967 | func writeGoMod(t *testing.T, pkgDir, tstDir string) { |
| 968 | template := ` |
no test coverage detected