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

Function TestBytes

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

Source from the content-addressed store, hash-verified

269}
270
271func TestBytes(t *testing.T) {
272 // t.Parallel()
273 path := "_examples/gobytes"
274 testPkg(t, pkg{
275 path: path,
276 lang: features[path],
277 cmd: "build",
278 extras: nil,
279 want: []byte(`Python bytes: b'\x00\x01\x02\x03'
280Go slice: go.Slice_byte len: 10 handle: 1 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
281gobytes.HashBytes from Go bytes: gobytes.Array_4_byte len: 4 handle: 2 [12, 13, 81, 81]
282Python bytes to Go: go.Slice_byte len: 4 handle: 3 [0, 1, 2, 3]
283Go bytes to Python: b'\x03\x04\x05'
284OK
285`),
286 })
287
288}
289
290func TestBindFuncs(t *testing.T) {
291 // t.Parallel()

Callers

nothing calls this directly

Calls 1

testPkgFunction · 0.85

Tested by

no test coverage detected