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

Function TestBindInterfaces

main_test.go:517–545  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

515}
516
517func TestBindInterfaces(t *testing.T) {
518 // t.Parallel()
519 path := "_examples/iface"
520 // NOTE: python2 outputs this in a different order, so test fails, but results are the same
521 testPkg(t, pkg{
522 path: path,
523 lang: features[path],
524 cmd: "build",
525 extras: nil,
526 want: []byte(`t.F [CALLED]
527iface.CallIface...
528t.F [CALLED]
529iface.CallIface... [DONE]
530iface as string: test string
531iface as string: 42
532iface as handle: &{0 }
533iface as handle: <nil>
534doc(iface): '\npackage iface tests various aspects of interfaces.\n\n'
535t = iface.T()
536t.F()
537iface.CallIface(t)
538iface.IfaceString("test string"
539iface.IfaceString(str(42))
540iface.IfaceHandle(t)
541iface.IfaceHandle(go.nil)
542OK
543`),
544 })
545}
546
547func TestBindCgoPackage(t *testing.T) {
548 // t.Parallel()

Callers

nothing calls this directly

Calls 1

testPkgFunction · 0.85

Tested by

no test coverage detected