MCPcopy Index your code
hub / github.com/gopherdata/gophernotes / sendShellRequest

Method sendShellRequest

kernel_test.go:377–396  ·  view source on GitHub ↗

sendShellRequest sends a message to the kernel over the shell channel. Upon error, sendShellRequest will Fail the test.

(t *testing.T, request ComposedMsg)

Source from the content-addressed store, hash-verified

375// sendShellRequest sends a message to the kernel over the shell channel. Upon error, sendShellRequest
376// will Fail the test.
377func (client *testJupyterClient) sendShellRequest(t *testing.T, request ComposedMsg) {
378 t.Helper()
379
380 var (
381 frames [][]byte
382 err error
383 )
384
385 frames = append(frames, []byte("<IDS|MSG>"))
386
387 reqMsgParts, err := request.ToWireMsg([]byte(connectionKey))
388 if err != nil {
389 t.Fatalf("\t%s request.ToWireMsg: %s", failure, err)
390 }
391 frames = append(frames, reqMsgParts...)
392
393 if err = client.shellSocket.SendMulti(zmq4.NewMsgFrom(frames...)); err != nil {
394 t.Fatalf("\t%s shellSocket.SendMessage: %s", failure, err)
395 }
396}
397
398// recvShellReply tries to read a reply message from the shell channel. It will timeout after the given
399// timeout delay. Upon error or timeout, recvShellReply will Fail the test.

Callers 1

performJupyterRequestMethod · 0.95

Calls 1

ToWireMsgMethod · 0.80

Tested by

no test coverage detected