diff --git a/_examples/hi/test.py b/_examples/hi/test.py index 7b15a2f..2e5a8a4 100644 --- a/_examples/hi/test.py +++ b/_examples/hi/test.py @@ -157,6 +157,7 @@ except Exception, err: arr[1] = 42 print "arr:",arr print "len(arr):",len(arr) +print "mem(arr):",len(memoryview(arr)) print "--- testing slice..." s = hi.GetIntSlice() @@ -173,4 +174,5 @@ except Exception, err: s[1] = 42 print "slice:",s print "len(slice):",len(s) +print "mem(slice):",len(memoryview(s)) diff --git a/main_test.go b/main_test.go index d9173da..d47b22d 100644 --- a/main_test.go +++ b/main_test.go @@ -145,6 +145,7 @@ arr[1]: 2 arr[2]: caught: array index out of range arr: [2]int{1, 42} len(arr): 2 +mem(arr): 2 --- testing slice... slice: []int{1, 2} len(slice): 2 @@ -153,6 +154,7 @@ slice[1]: 2 slice[2]: caught: array index out of range slice: []int{1, 42} len(slice): 2 +mem(slice): 2 `) buf := new(bytes.Buffer) cmd = exec.Command("python2", "./test.py")