Skip to content

Commit a44f1e5

Browse files
gopyerrors is not applicable any more.
1 parent 9020e61 commit a44f1e5

File tree

3 files changed

+0
-70
lines changed

3 files changed

+0
-70
lines changed

_examples/gopyerrors/gopyerrors.go

-29
This file was deleted.

_examples/gopyerrors/test.py

-13
This file was deleted.

main_test.go

-28
Original file line numberDiff line numberDiff line change
@@ -109,34 +109,6 @@ func TestGofmt(t *testing.T) {
109109
}
110110
}
111111

112-
func TestGoPyErrors(t *testing.T) {
113-
pyvm := testBackends["py3"]
114-
workdir, err := ioutil.TempDir("", "gopy-")
115-
if err != nil {
116-
t.Fatalf("could not create workdir: %v\n", err)
117-
}
118-
t.Logf("pyvm: %s making work dir: %s\n", pyvm, workdir)
119-
defer os.RemoveAll(workdir)
120-
121-
curPkgPath := reflect.TypeOf(pkg{}).PkgPath()
122-
fpath := filepath.Join(curPkgPath, "_examples/gopyerrors")
123-
cmd := exec.Command("go", "run", ".", "gen", "-vm="+pyvm, "-output="+workdir, fpath)
124-
t.Logf("running: %v\n", cmd.Args)
125-
out, err := cmd.CombinedOutput()
126-
if err != nil {
127-
t.Fatalf("could not run %v: %+v\n", strings.Join(cmd.Args, " "), err)
128-
}
129-
contains := `--- Processing package: github.com/rudderlabs/gopy/_examples/gopyerrors ---
130-
ignoring python incompatible function: .func github.com/rudderlabs/gopy/_examples/gopyerrors.NotErrorMany() (int, int): func() (int, int): gopy: second result value must be of type error: func() (int, int)
131-
ignoring python incompatible method: gopyerrors.func (*github.com/rudderlabs/gopy/_examples/gopyerrors.Struct).NotErrorMany() (int, string): func() (int, string): gopy: second result value must be of type error: func() (int, string)
132-
ignoring python incompatible method: gopyerrors.func (*github.com/rudderlabs/gopy/_examples/gopyerrors.Struct).TooMany() (int, int, string): func() (int, int, string): gopy: too many results to return: func() (int, int, string)
133-
ignoring python incompatible function: .func github.com/rudderlabs/gopy/_examples/gopyerrors.TooMany() (int, int, string): func() (int, int, string): gopy: too many results to return: func() (int, int, string)
134-
`
135-
if got, want := string(out), contains; !strings.Contains(got, want) {
136-
t.Fatalf("%v does not contain\n%v\n", got, want)
137-
}
138-
}
139-
140112
func TestHi(t *testing.T) {
141113
// t.Parallel()
142114
path := "_examples/hi"

0 commit comments

Comments
 (0)