mirror of https://github.com/go-python/gopy.git
bind: add test for 'simple' package
Change-Id: If0bd1c6ba29d4916990c756bec25e2e80da94c6d
This commit is contained in:
parent
73f11b29bb
commit
73845d817e
|
@ -0,0 +1,17 @@
|
||||||
|
# Copyright 2015 The go-python Authors. All rights reserved.
|
||||||
|
# Use of this source code is governed by a BSD-style
|
||||||
|
# license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
## py2/py3 compat
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
|
import simple as pkg
|
||||||
|
|
||||||
|
print("doc(pkg):\n%s" % repr(pkg.__doc__))
|
||||||
|
print("pkg.Func()...")
|
||||||
|
pkg.Func()
|
||||||
|
print("fct = pkg.Func...")
|
||||||
|
fct = pkg.Func
|
||||||
|
print("fct()...")
|
||||||
|
fct()
|
||||||
|
|
13
main_test.go
13
main_test.go
|
@ -212,3 +212,16 @@ s2.F1() = None
|
||||||
`),
|
`),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestBindSimple(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
testPkg(t, pkg{
|
||||||
|
path: "_examples/simple",
|
||||||
|
want: []byte(`doc(pkg):
|
||||||
|
'simple is a simple package.\n'
|
||||||
|
pkg.Func()...
|
||||||
|
fct = pkg.Func...
|
||||||
|
fct()...
|
||||||
|
`),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue