go-python / go-python/gopy

leaking struct, slice, map

Đang mở
#291 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
2.3k
Fork
136
Merge trung bình
14 phút
Pull request đã merge (30 ngày)
2

Mô tả

I haven't really been paying close attention to this test -- assumed it was another string formatting one that was failing -- tried to go back in time to when this test was first committed but that is not possible on modern go version.. anyway, it probably was always like this but I'm not sure :)

```
oreilly@mshadow:~/go/src/github.com/go-python/gopy/ > go test -run TestCStrings
2022/07/11 12:11:27 checking testbackend: "py3"...
2022/07/11 12:11:27 enabling testbackend: "py3"
2022/07/11 12:11:27 checking testbackend: "py2"...
2022/07/11 12:11:27 disabling testbackend: "py2", error: 'exec: "python2": executable file not found in $PATH'
2022/07/11 12:11:27 The following test backends are not available: py2
looping over backends: py3 in [py3]
run cmd: [build -vm=python3 -output=/var/folders/x1/r8shprmj7j71zbw3qvgl9dqc0000gq/T/gopy-3088345620 -package-prefix ./_examples/cstrings]
github.com/go-python/gopy/_examples/cstrings

--- Processing package: github.com/go-python/gopy/_examples/cstrings ---

--- building package ---
gopy.test -test.paniconexit0 -test.timeout=10m0s -test.run=TestCStrings
goimports -w cstrings.go
go build -mod=mod -buildmode=c-shared -o cstrings_go.so .
/usr/local/bin/python3 build.py
CGO_CFLAGS=-I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -fPIC -Ofast
CGO_LDFLAGS=-L/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib -lpython3.9 -ldl -framework CoreFoundation
go build -mod=mod -buildmode=c-shared -o _cstrings.cpython-39-darwin.so .
running python3 test.py
--- FAIL: TestCStrings (8.01s)
--- FAIL: TestCStrings/py3 (8.01s)
main_test.go:1048: [python3:_examples/cstrings]: error running python module:
got:
gofnString leaked: False
gofnStruct leaked: True
gofnNestedStruct leaked: True
gofnSlice leaked: True
gofnMap leaked: True
OK


want:
gofnString leaked: False
gofnStruct leaked: False
gofnNestedStruct leaked: False
gofnSlice leaked: False
gofnMap leaked: False
OK

[python3:_examples/cstrings] diff:
--- /var/folders/x1/r8shprmj7j71zbw3qvgl9dqc0000gq/T/gopy-3088345620/want.txt 2022-07-11 12:11:35.000000000 -0700
+++ /var/folders/x1/r8shprmj7j71zbw3qvgl9dqc0000gq/T/gopy-3088345620/got.txt 2022-07-11 12:11:35.000000000 -0700
@@ -1,6 +1,6 @@
gofnString leaked: False
-gofnStruct leaked: False
-gofnNestedStruct leaked: False
-gofnSlice leaked: False
-gofnMap leaked: False
+gofnStruct leaked: True
+gofnNestedStruct leaked: True
+gofnSlice leaked: True
+gofnMap leaked: True
OK

FAIL
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.